From 214ffea95efb102f3fe194cafe68c48276971dae Mon Sep 17 00:00:00 2001 From: ShaneBeee Date: Sat, 9 May 2020 15:45:52 +1000 Subject: [PATCH] SPIGOT-5727: GameRule doImmediateRespawn cannot be set per-world --- nms-patches/PlayerList.patch | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nms-patches/PlayerList.patch b/nms-patches/PlayerList.patch index 6885e63d6b..925b41861c 100644 --- a/nms-patches/PlayerList.patch +++ b/nms-patches/PlayerList.patch @@ -627,7 +627,7 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE)); entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); -@@ -643,17 +917,26 @@ +@@ -643,17 +917,28 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); if (worldserver.isRaining()) { @@ -654,11 +654,13 @@ + // CraftBukkit start - from GameRules + int i = entityplayer.world.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23; + entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) i)); ++ float immediateRespawn = entityplayer.world.getGameRules().getBoolean(GameRules.DO_IMMEDIATE_RESPAWN) ? 1.0F: 0.0F; ++ entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(11, immediateRespawn)); + // CraftBukkit end } public int getPlayerCount() { -@@ -710,33 +993,52 @@ +@@ -710,33 +995,52 @@ } public void shutdown() { @@ -718,7 +720,7 @@ if (file2.exists() && file2.isFile()) { file2.renameTo(file1); -@@ -744,7 +1046,7 @@ +@@ -744,7 +1048,7 @@ } serverstatisticmanager = new ServerStatisticManager(this.server, file1); @@ -727,7 +729,7 @@ } return serverstatisticmanager; -@@ -752,14 +1054,14 @@ +@@ -752,14 +1056,14 @@ public AdvancementDataPlayer f(EntityPlayer entityplayer) { UUID uuid = entityplayer.getUniqueID(); @@ -744,7 +746,7 @@ } advancementdataplayer.a(entityplayer); -@@ -795,13 +1097,20 @@ +@@ -795,13 +1099,20 @@ } public void reload() {