13
0
geforkt von Mirrors/Paper

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")) {
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
}

Datei anzeigen

@ -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));

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);
}
} else {
server.getMessenger().dispatchIncomingMessage(player.getPlayer(), packet.tag, packet.data);
server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packet.tag, packet.data);
}
}
// CraftBukkit end