2014-08-04 20:11:38 +00:00
|
|
|
From c8fe049a4daea2cf9b6c6e61009f18a7477e0a5e Mon Sep 17 00:00:00 2001
|
2014-07-22 20:25:09 +00:00
|
|
|
From: Jonas Konrad <me@yawk.at>
|
|
|
|
Date: Fri, 4 Jul 2014 23:03:13 +0200
|
|
|
|
Subject: [PATCH] Make "moved wrongly" limit configurable
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2014-07-27 19:14:24 +00:00
|
|
|
index 20c49e3..cd4f0c9 100644
|
2014-07-22 20:25:09 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
@@ -399,7 +399,8 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
|
|
d10 = d4 * d4 + d5 * d5 + d6 * d6;
|
|
|
|
boolean flag1 = false;
|
|
|
|
|
|
|
|
- if (d10 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
|
|
|
+ // Spigot: make "moved wrongly" limit configurable
|
|
|
|
+ if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
|
|
|
flag1 = true;
|
|
|
|
c.warn(this.player.getName() + " moved wrongly!");
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-07-27 19:14:24 +00:00
|
|
|
index 429ad36..6a230f9 100644
|
2014-07-22 20:25:09 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-07-27 19:14:24 +00:00
|
|
|
@@ -333,4 +333,10 @@ public class SpigotConfig
|
2014-07-22 20:25:09 +00:00
|
|
|
{
|
|
|
|
intCacheLimit = getInt( "settings.int-cache-limit", 1024 );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static double movedWronglyThreshold;
|
|
|
|
+ private static void movedWronglyThreshold()
|
|
|
|
+ {
|
|
|
|
+ movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
2014-07-30 08:35:19 +00:00
|
|
|
|