From 48342b06ca2162005e62521fcf7eb83f11b91348 Mon Sep 17 00:00:00 2001 From: Anton Lindroth Date: Wed, 15 Apr 2020 02:25:35 +0200 Subject: [PATCH] Allow signs that are inside of the spawn protection to be right clicked to use their run_command tag --- ...-using-signs-inside-spawn-protection.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Spigot-Server-Patches/0692-Allow-using-signs-inside-spawn-protection.patch diff --git a/Spigot-Server-Patches/0692-Allow-using-signs-inside-spawn-protection.patch b/Spigot-Server-Patches/0692-Allow-using-signs-inside-spawn-protection.patch new file mode 100644 index 0000000000..65fb625b14 --- /dev/null +++ b/Spigot-Server-Patches/0692-Allow-using-signs-inside-spawn-protection.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Anton Lindroth +Date: Wed, 15 Apr 2020 01:54:02 +0200 +Subject: [PATCH] Allow using signs inside spawn protection + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index b473709774fbbd502d5e04c98041ae7c829b4083..fd675585c61387156892b179af593ad640873d45 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -810,4 +810,9 @@ public class PaperWorldConfig { + fixWitherTargetingBug = getBoolean("fix-wither-targeting-bug", false); + log("Withers properly target players: " + fixWitherTargetingBug); + } ++ ++ public boolean allowUsingSignsInsideSpawnProtection = false; ++ private void allowUsingSignsInsideSpawnProtection() { ++ allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection); ++ } + } +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index f3679a3ad2d51612381bc47bb23eeffec924d478..3db6a4903c77729145a797b747d992abaf6e6b5d 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -1545,7 +1545,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + + this.player.resetIdleTimer(); + if (blockposition.getY() < this.minecraftServer.getMaxBuildHeight()) { +- if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.a((EntityHuman) this.player, blockposition)) { ++ if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.a((EntityHuman) this.player, blockposition) || (worldserver.getType(blockposition).getBlock() instanceof net.minecraft.server.BlockSign && worldserver.paperConfig.allowUsingSignsInsideSpawnProtection))) { // Paper + // CraftBukkit start - Check if we can actually do something over this large a distance + // Paper - move check up + this.player.clearActiveItem(); // SPIGOT-4706