Fixed the dreaded GSOD crash. Fixes BUKKIT-1040

This commit is contained in:
EvilSeph 2012-03-05 22:44:29 -05:00
parent 2ff8a8749f
commit b5af5adc7e

View File

@ -303,6 +303,8 @@ public class ServerConfigurationManager {
// CraftBukkit start
byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId());
// Force the client to refresh their chunk cache.
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn((byte) (actualDimension >= 0 ? -1 : 0), (byte) worldserver.difficulty, worldserver.getWorldData().getType(), worldserver.getHeight(), entityplayer.itemInWorldManager.getGameMode()));
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension, (byte) worldserver.difficulty, worldserver.getWorldData().getType(), worldserver.getHeight(), entityplayer.itemInWorldManager.getGameMode()));
entityplayer1.spawnIn(worldserver);
entityplayer1.dead = false;