diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index a3a13f2dab..5acd959cb1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -75,13 +75,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (nbttagcompound.hasKey("playerGameType")) { this.itemInWorldManager.setGameMode(nbttagcompound.getInt("playerGameType")); } - getPlayer().readExtraData(nbttagcompound); // CraftBukkit + this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); nbttagcompound.setInt("playerGameType", this.itemInWorldManager.getGameMode()); - getPlayer().setExtraData(nbttagcompound); // CraftBukkit + this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit } public void spawnIn(World world) { @@ -669,8 +669,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.keepLevel = false; } - public CraftPlayer getPlayer() { - return (CraftPlayer) getBukkitEntity(); + @Override + public CraftPlayer getBukkitEntity() { + return (CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 82e3804c97..afa1818ba1 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -112,7 +112,7 @@ public class NetLoginHandler extends NetHandler { maxPlayers = 60; } netserverhandler.sendPacket(new Packet1Login("", entityplayer.id, worldserver.getSeed(), worldserver.getWorldData().getType(), entityplayer.itemInWorldManager.getGameMode(), (byte) worldserver.worldProvider.dimension, (byte) worldserver.difficulty, (byte) worldserver.height, (byte) maxPlayers)); - entityplayer.getPlayer().sendSupportedChannels(); + entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit end netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z)); diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index a03b96776e..89e71cebef 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -1141,7 +1141,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { Logger.getLogger(NetServerHandler.class.getName()).log(Level.SEVERE, "Could not parse UNREGISTER payload in plugin message packet", ex); } } else { - server.getMessenger().dispatchIncomingMessage(player.getPlayer(), packet.tag, packet.data); + server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packet.tag, packet.data); } } // CraftBukkit end