Fixed wrong game type being sent when a player is teleported across worlds. Fixes BUKKIT-510

This commit is contained in:
EvilSeph 2012-02-01 01:29:41 -05:00
parent b269d6b63b
commit 8b5289d431

View File

@ -283,7 +283,7 @@ public class ServerConfigurationManager {
// CraftBukkit start // CraftBukkit start
byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId()); byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId());
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension, (byte) worldserver.difficulty, worldserver.getSeed(), entityplayer1.world.getWorldData().getType(), worldserver.height, entityplayer.itemInWorldManager.getGameMode())); entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension, (byte) worldserver.difficulty, worldserver.getSeed(), worldserver.getWorldData().getType(), worldserver.height, entityplayer.itemInWorldManager.getGameMode()));
entityplayer1.spawnIn(worldserver); entityplayer1.spawnIn(worldserver);
entityplayer1.dead = false; entityplayer1.dead = false;
entityplayer1.netServerHandler.teleport(new Location(worldserver.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch)); entityplayer1.netServerHandler.teleport(new Location(worldserver.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch));