mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-27 13:15:19 +01:00
30 lines
1.5 KiB
Diff
30 lines
1.5 KiB
Diff
From 590cd93be05350962a3c1423796a1521c5d4450a 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 ecf7a8c6d9..64d5136346 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1045,9 +1045,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
|
|
|