mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 11:38:29 +01:00
Use OO > new method
This commit is contained in:
parent
3173b68bbe
commit
c5a4bfd291
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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));
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user