2015-02-28 11:36:22 +00:00
|
|
|
From 2faeafd3fcc78777f16617fc147b7b4bc95b2530 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-02-28 11:36:22 +00:00
|
|
|
index 2e5a55d..7f5044d 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-02-28 11:36:22 +00:00
|
|
|
@@ -389,7 +389,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
2014-07-27 19:14:24 +00:00
|
|
|
// CraftBukkit end
|
2014-11-28 01:17:45 +00:00
|
|
|
double d17 = d14 * d14 + d15 * d15 + d16 * d16;
|
2014-07-27 19:14:24 +00:00
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
- if (d17 > 100.0D && this.checkMovement && (!this.minecraftServer.S() || !this.minecraftServer.R().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
|
2014-07-27 19:14:24 +00:00
|
|
|
+ // Spigot: make "moved too quickly" limit configurable
|
2014-11-28 01:17:45 +00:00
|
|
|
+ if (d17 > org.spigotmc.SpigotConfig.movedTooQuicklyThreshold && this.checkMovement && (!this.minecraftServer.S() || !this.minecraftServer.R().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 + " (" + d14 + ", " + d15 + ", " + d16 + ")");
|
|
|
|
this.a(this.o, this.p, this.q, this.player.yaw, this.player.pitch);
|
2014-07-27 19:14:24 +00:00
|
|
|
return;
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-11-28 01:17:45 +00:00
|
|
|
index 759a95a..8233de7 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
|
|
|
|
@@ -339,4 +339,10 @@ public class SpigotConfig
|
|
|
|
{
|
|
|
|
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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 01:17:45 +00:00
|
|
|
2.1.0
|
2014-07-30 08:35:19 +00:00
|
|
|
|