aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0231-Toggleable-player-crits-helps-mitigate-hacked-client.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0231-Toggleable-player-crits-helps-mitigate-hacked-client.patch')
-rw-r--r--Spigot-Server-Patches/0231-Toggleable-player-crits-helps-mitigate-hacked-client.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0231-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/0231-Toggleable-player-crits-helps-mitigate-hacked-client.patch
new file mode 100644
index 0000000000..1227509333
--- /dev/null
+++ b/Spigot-Server-Patches/0231-Toggleable-player-crits-helps-mitigate-hacked-client.patch
@@ -0,0 +1,37 @@
+From 0bef2f366cef39dcaf0a10707d705746496694b2 Mon Sep 17 00:00:00 2001
+From: MiniDigger <[email protected]>
+Date: Sat, 10 Mar 2018 00:50:24 +0100
+Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
+
+
+diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+index 07a8ef697f..f68b8a4b05 100644
+--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+@@ -191,6 +191,11 @@ public class PaperWorldConfig {
+ disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false);
+ }
+
++ public boolean disablePlayerCrits;
++ private void disablePlayerCrits() {
++ disablePlayerCrits = getBoolean("game-mechanics.disable-player-crits", false);
++ }
++
+ public boolean allChunksAreSlimeChunks;
+ private void allChunksAreSlimeChunks() {
+ allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
+diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
+index 259f73f66e..1640098c35 100644
+--- a/src/main/java/net/minecraft/server/EntityHuman.java
++++ b/src/main/java/net/minecraft/server/EntityHuman.java
+@@ -1029,6 +1029,7 @@ public abstract class EntityHuman extends EntityLiving {
+
+ boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.z_() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving;
+
++ flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
+ flag2 = flag2 && !this.isSprinting();
+ if (flag2) {
+ f *= 1.5F;
+--
+2.21.0
+