}
public void messageReceived(Client source, Message m) {
if(m instanceof PlayerMessage){
PlayerMessage playerMessage = (PlayerMessage) m;
if(gameClient.isUp() && playerMessage.isMove()){
Player player;
player = gameClient.getPlayerByName(playerMessage.getName());
if(player != null){
player.setWalkDirection(playerMessage.getX(), playerMessage.getY(), playerMessage.getZ());
player.setCurrentPosition(playerMessage.getPosX(), playerMessage.getPosY(), playerMessage.getPosZ());
player.getAvatarControlSystem().setUpdateNeeded(true);
}
}else if(!playerMessage.isMove()){
gameClient.setMainPlayer(playerMessage.getName(), playerMessage.getId(), playerMessage.getUUID());
gameClient.getFormHandler().startGame();
}
}
if(m instanceof PlayerSyncMessage){