Yatopia/patches/server/0008-EMC-MovedTooQuickly-event.patch
2020-02-26 20:12:29 +01:00

30 lines
1.5 KiB
Diff

From 10313deafa4ad7cf44a3b67d50f0ea66daa7410c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Sep 2013 22:01:47 -0400
Subject: [PATCH] EMC MovedTooQuickly event
also make creative immune to this event
---
src/main/java/net/minecraft/server/PlayerConnection.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 108377d7..5252ebe0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1000,9 +1000,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
// CraftBukkit end
+ if (new com.empireminecraft.customevents.MovedTooQuicklyEvent(d10, getPlayer()).callEvent()) { // EMC
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), d7, d8, d9);
this.a(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch);
return;
+ } // EMC
}
}
--
2.25.1.windows.1