private void parseData(byte[] data, InetAddress address, int port) {
	String message = new String(data).trim();
	PacketType type = Packet.getPacketType(message.substring(0, 2));
	Packet packet = null;
	switch(type) {
	    case INVALID:
		break;
	    case LOGIN:
		packet = new Packet00Login(data);
		handleLogin((Packet00Login) packet, address, port);
		break;
	    case DISCONNECT:
		packet = new Packet01Disconnect(data);
		System.out.println(((Packet01Disconnect) packet).getUsername() + " [" + address.getHostAddress() + ":" + port + "] has diconnected!");
		disconnect((Packet01Disconnect) packet);
		break;
	    case MOVE:
		packet = new Packet02Move(data);
		handleMove((Packet02Move) packet);
		break;
	    case PROJECTILE:
		packet = new Packet03Projectile(data);
		addProjectile((Packet03Projectile) packet);
		break;
	    case ADD_NPC:
		packet = new Packet05AddNPC(data);
		addNPC((Packet05AddNPC) packet);
		break;
	    case INVISIBLE:
		packet = new Packet06ToggleInvisible(data);
		handleInvisibility((Packet06ToggleInvisible) packet);
		break;
	    case RESPAWN:
		packet = new Packet07Respawn(data);
		respawn((Packet07Respawn) packet);
	    default:
		break;
		
		
	}
    }