Paper/Spigot-Server-Patches/0202-Toggleable-player-crits-helps-mitigate-hacked-client.patch
Shane Freeder aba4969668
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e970fd72 Remove incorrect javadoc from TargetReason
84df6df1 SPIGOT-5282: Improve bucket event API

CraftBukkit Changes:
b2bcde89 SPIGOT-5258: TNT Not Moving Players in Creative Mode
44d675ad SPIGOT-5263: Chests stay open after InventoryOpenEvent cancelled.
2439178e SPIGOT-5278: EntityDrowned memory leak
7055c931 SPIGOT-5264: Call event for experience orbs losing their target
49141172 SPIGOT-5282: Improve bucket event API
6bbb3b04 SPIGOT-5281: Clearer error messages for ChunkSnapshot misuse
2019-08-26 15:36:37 +01:00

38 lines
1.8 KiB
Diff

From ad8729ec47c2d43f8740a8281437b0cee39798c2 Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me>
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 7287bf7d9..94ffba97b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -182,6 +182,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 50ded7483..0b27b7a27 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -997,6 +997,7 @@ public abstract class EntityHuman extends EntityLiving {
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.isClimbing() && !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.23.0