package electrosphere.net.client.protocol; import org.joml.Vector3i; import electrosphere.engine.Globals; import electrosphere.engine.Main; import electrosphere.logger.LoggerInterface; import electrosphere.net.parser.net.message.PlayerMessage; import electrosphere.net.server.player.Player; public class PlayerProtocol { protected static void handlePlayerMessage(PlayerMessage message){ switch(message.getMessageSubtype()){ case SET_ID: Globals.clientPlayer = new Player(message.getplayerID()); LoggerInterface.loggerNetworking.DEBUG("Player ID is " + Globals.clientPlayer.getId()); break; case SETINITIALDISCRETEPOSITION: Globals.clientPlayerData.setWorldPos(new Vector3i(message.getinitialDiscretePositionX(), message.getinitialDiscretePositionY(), message.getinitialDiscretePositionZ())); break; } } }