3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 05:20:05 +01:00

Use OO > new method

Dieser Commit ist enthalten in:
Erik Broes 2012-01-29 16:06:11 +01:00
Ursprung 3173b68bbe
Commit c5a4bfd291
3 geänderte Dateien mit 7 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -75,13 +75,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (nbttagcompound.hasKey("playerGameType")) { if (nbttagcompound.hasKey("playerGameType")) {
this.itemInWorldManager.setGameMode(nbttagcompound.getInt("playerGameType")); this.itemInWorldManager.setGameMode(nbttagcompound.getInt("playerGameType"));
} }
getPlayer().readExtraData(nbttagcompound); // CraftBukkit this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit
} }
public void b(NBTTagCompound nbttagcompound) { public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound); super.b(nbttagcompound);
nbttagcompound.setInt("playerGameType", this.itemInWorldManager.getGameMode()); nbttagcompound.setInt("playerGameType", this.itemInWorldManager.getGameMode());
getPlayer().setExtraData(nbttagcompound); // CraftBukkit this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit
} }
public void spawnIn(World world) { public void spawnIn(World world) {
@ -669,8 +669,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.keepLevel = false; this.keepLevel = false;
} }
public CraftPlayer getPlayer() { @Override
return (CraftPlayer) getBukkitEntity(); public CraftPlayer getBukkitEntity() {
return (CraftPlayer) super.getBukkitEntity();
} }
// CraftBukkit end // CraftBukkit end
} }

Datei anzeigen

@ -112,7 +112,7 @@ public class NetLoginHandler extends NetHandler {
maxPlayers = 60; 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)); 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 // CraftBukkit end
netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z)); netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z));

Datei anzeigen

@ -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); Logger.getLogger(NetServerHandler.class.getName()).log(Level.SEVERE, "Could not parse UNREGISTER payload in plugin message packet", ex);
} }
} else { } else {
server.getMessenger().dispatchIncomingMessage(player.getPlayer(), packet.tag, packet.data); server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packet.tag, packet.data);
} }
} }
// CraftBukkit end // CraftBukkit end