aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0525-Allow-using-signs-inside-spawn-protection.patch
diff options
context:
space:
mode:
authorOwen <[email protected]>2024-03-03 17:05:34 -0500
committerGitHub <[email protected]>2024-03-03 17:05:34 -0500
commit89d51d5f298cd25d6f44388970596c6780b5664b (patch)
tree07f41f4ce7bc466ea5e35faa2575d0ec6f6c4a76 /patches/server/0525-Allow-using-signs-inside-spawn-protection.patch
parentb21eb4d9a4d0d0bea857675e2186657592df548e (diff)
downloadPaper-89d51d5f298cd25d6f44388970596c6780b5664b.tar.gz
Paper-89d51d5f298cd25d6f44388970596c6780b5664b.zip
Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
Diffstat (limited to 'patches/server/0525-Allow-using-signs-inside-spawn-protection.patch')
-rw-r--r--patches/server/0525-Allow-using-signs-inside-spawn-protection.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0525-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0525-Allow-using-signs-inside-spawn-protection.patch
new file mode 100644
index 0000000000..0eefa73f3f
--- /dev/null
+++ b/patches/server/0525-Allow-using-signs-inside-spawn-protection.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Anton Lindroth <[email protected]>
+Date: Wed, 15 Apr 2020 01:54:02 +0200
+Subject: [PATCH] Allow using signs inside spawn protection
+
+
+diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+index e5113e86836f9c21570705b1ad312d76e8162e5f..f455c7ab48accf581a8ecdbc78a12b055dbd19fa 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -1752,7 +1752,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ int i = this.player.level().getMaxBuildHeight();
+
+ if (blockposition.getY() < i) {
+- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) {
++ if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig().spawn.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper - Allow using signs inside spawn protection
+ this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706
+ InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock);
+