2015-06-01 09:22:52 +00:00
|
|
|
From bbf233abd32c15cf9fc7a04f9f2fadc4268b767c Mon Sep 17 00:00:00 2001
|
2014-07-27 19:14:24 +00:00
|
|
|
From: Jonas Konrad <me@yawk.at>
|
|
|
|
Date: Tue, 22 Jul 2014 15:59:01 +0200
|
|
|
|
Subject: [PATCH] Make "moved too quickly" limit configurable
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2015-05-29 09:35:21 +00:00
|
|
|
index 54bc1b0..9216dee 100644
|
2014-07-27 19:14:24 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2015-05-22 13:52:56 +00:00
|
|
|
@@ -390,7 +390,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
|
|
double d14 = this.player.motX * this.player.motX + this.player.motY * this.player.motY + this.player.motZ * this.player.motZ;
|
|
|
|
double d15 = d11 * d11 + d12 * d12 + d13 * d13;
|
2014-07-27 19:14:24 +00:00
|
|
|
|
2015-05-22 13:52:56 +00:00
|
|
|
- if (d15 - d14 > 100.0D && this.checkMovement && (!this.minecraftServer.T() || !this.minecraftServer.S().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
|
|
|
|
+ // Spigot: make "moved too quickly" limit configurable
|
|
|
|
+ if (d15 - d14 > org.spigotmc.SpigotConfig.movedTooQuicklyThreshold && this.checkMovement && (!this.minecraftServer.T() || !this.minecraftServer.S().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
|
|
|
|
PlayerConnection.c.warn(this.player.getName() + " moved too quickly! " + d11 + "," + d12 + "," + d13 + " (" + d11 + ", " + d12 + ", " + d13 + ")");
|
|
|
|
this.a(this.o, this.p, this.q, this.player.yaw, this.player.pitch);
|
|
|
|
return;
|
2014-07-27 19:14:24 +00:00
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2015-05-25 19:09:58 +00:00
|
|
|
index 7e774f2..2a23a4e 100644
|
2014-07-27 19:14:24 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2015-05-25 19:09:58 +00:00
|
|
|
@@ -340,4 +340,10 @@ public class SpigotConfig
|
2014-07-27 19:14:24 +00:00
|
|
|
{
|
|
|
|
movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static double movedTooQuicklyThreshold;
|
|
|
|
+ private static void movedTooQuicklyThreshold()
|
|
|
|
+ {
|
|
|
|
+ movedTooQuicklyThreshold = getDouble( "settings.moved-too-quickly-threshold", 100.0D );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-05-29 09:35:21 +00:00
|
|
|
2.1.4
|
2014-07-30 08:35:19 +00:00
|
|
|
|