ServerPlayer.java 692 B

123456789101112131415161718192021222324252627282930313233
  1. package eu.tankernn.game.server.entities.player;
  2. import eu.tankernn.game.server.entities.ServerEntity;
  3. import eu.tankernn.gameEngine.entities.EntityState;
  4. import io.netty.channel.Channel;
  5. public class ServerPlayer extends ServerEntity {
  6. private final Channel channel;
  7. private String username;
  8. public ServerPlayer(Channel channel) {
  9. super(new EntityState());
  10. state.setModelId(0);
  11. this.channel = channel;
  12. }
  13. public String getUsername() {
  14. return username;
  15. }
  16. public void setUsername(String username) {
  17. this.username = username;
  18. }
  19. public Channel getChannel() {
  20. return channel;
  21. }
  22. public int getId() {
  23. return state.getId();
  24. }
  25. }