public void received(Connection c, Object o) {
		if (o instanceof PlayerAddPacket) {
			PlayerAddPacket p = (PlayerAddPacket) o;
			Player p2 = new Player();
			p2.x = p.x;
			p2.y = p.y;
			p2.id = p.id;
			p2.name = p.name;
			p2.c = c;
			p2.health = 100;
			players.put(c.getID(), p2);
			server.sendToAllExceptTCP(c.getID(), p);
			ServerGame.logger.info("A player joined the game: " + p2.name);
			MessagePacket p3 = new MessagePacket();
			p3.id = -1;
			p3.message = "We have an a connection from : " + p2.name;
			server.sendToAllExceptTCP(c.getID(), p3);
			c.sendTCP(p3);
			sg.pl.append(p.name + "                  " + "\n");
		} else if (o instanceof PlayerXUpdatePacket) {
			PlayerXUpdatePacket p = (PlayerXUpdatePacket) o;
			players.get(c.getID()).x = p.x;
			server.sendToAllExceptTCP(c.getID(), p);
		} else if (o instanceof PlayerYUpdatePacket) {
			PlayerYUpdatePacket p = (PlayerYUpdatePacket) o;
			players.get(c.getID()).y = p.y;
			server.sendToAllExceptTCP(c.getID(), p);
		} else if (o instanceof PlayerRemovePacket) {
			PlayerRemovePacket p = (PlayerRemovePacket) o;
			players.remove(players.get(players.get(c.getID())));
			server.sendToAllExceptTCP(c.getID(), p);
		} else if (o instanceof ProjectilePacket) {
			ProjectilePacket pack = (ProjectilePacket) o;
			Projectile p = new Projectile();
			p.id = pack.id;
			p.c = c;
			p.x = pack.x;
			p.y = pack.y;
			p.xVel = pack.xVel;
			p.yVel = pack.yVel;
			proj.put(p.id, p);
			server.sendToAllExceptTCP(c.getID(), pack);

		} else if (o instanceof ProjectileRemovePacket) {
			ProjectileRemovePacket p = (ProjectileRemovePacket) o;
			proj.remove(p.id);
			server.sendToAllExceptTCP(c.getID(), p);
		}else if(o instanceof PlayerHealthPacket){
			PlayerHealthPacket p = (PlayerHealthPacket) o;
			players.get(c.getID()).health = p.health;
			players.get(c.getID()).died = p.died;
			server.sendToAllExceptTCP(c.getID(), p);
		}else if(o instanceof DiedCountPacket){
			DiedCountPacket d = (DiedCountPacket) o;
			players.get(c.getID()).died = d.died;
			server.sendToAllExceptTCP(c.getID(), d);
		}
		c.setKeepAliveTCP(120000);
		sg.pl.setRows(0);
		sg.pl.setText("");
		sg.pl.cut();
		for (Player p : players.values()) {
			sg.pl.append(p.name + "                  " + "\n");
		}
	}