diff --git a/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch b/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch index 1120410219..dc6cca3282 100644 --- a/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch +++ b/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch @@ -10,7 +10,7 @@ This fixes that by checking if the modified spawn location is still at a respawn anchor. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3c2f1f140c3991195bb8147bd65d9cd16a8fd3da..b8ec7941784885ace0c33fdf768ddcba284a12f9 100644 +index 9e438590113b2c7a318c812637c8aa14341df3e6..9382e8f79e8edec8885c629a36e230fbec50e1fb 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -766,6 +766,7 @@ public abstract class PlayerList { @@ -51,8 +51,8 @@ index 3c2f1f140c3991195bb8147bd65d9cd16a8fd3da..b8ec7941784885ace0c33fdf768ddcba - if (flag2) { - entityplayer1.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.BLOCK_RESPAWN_ANCHOR_DEPLETE, SoundCategory.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F)); + // Paper start - Fix SPIGOT-5989 -+ IBlockData data = worldserver1.getType(blockposition); + if (flag2 && !isLocAltered) { ++ IBlockData data = worldserver1.getType(blockposition); + worldserver1.setTypeAndData(blockposition, data.set(BlockRespawnAnchor.a, data.get(BlockRespawnAnchor.a) - 1), 3); + entityplayer1.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.BLOCK_RESPAWN_ANCHOR_DEPLETE, SoundCategory.BLOCKS, (double) location.getX(), (double) location.getY(), (double) location.getZ(), 1.0F, 1.0F)); + // Paper end