From 4633e6c5c74ce0015e995bc7675819ee00a83869 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 11 Dec 2019 12:36:03 +1100 Subject: [PATCH] Fix crash with disabled worlds --- nms-patches/EntityPlayer.patch | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch index de89163e19..b593e946c6 100644 --- a/nms-patches/EntityPlayer.patch +++ b/nms-patches/EntityPlayer.patch @@ -355,20 +355,18 @@ this.decouple(); this.getWorldServer().removePlayer(this); if (!this.viewingCredits) { -@@ -503,10 +697,12 @@ +@@ -503,8 +697,10 @@ } else { WorldServer worldserver = this.server.getWorldServer(dimensionmanager1); - this.dimension = dimensionmanager; + // this.dimension = dimensionmanager; // CraftBukkit WorldServer worldserver1 = this.server.getWorldServer(dimensionmanager); - WorldData worlddata = worldserver1.getWorldData(); - + // CraftBukkit start + /* + WorldData worlddata = worldserver1.getWorldData(); + this.playerConnection.sendPacket(new PacketPlayOutRespawn(dimensionmanager, WorldData.c(worlddata.getSeed()), worlddata.getType(), this.playerInteractManager.getGameMode())); - this.playerConnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); - PlayerList playerlist = this.server.getPlayerList(); @@ -514,6 +710,8 @@ playerlist.d(this); worldserver.removePlayer(this);