2015-05-25 19:09:58 +00:00
|
|
|
From 8e4e7ddb561ab48c6ed60a4f4fbbdf6cc2ed30c1 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
|
2015-05-25 12:05:40 +00:00
|
|
|
index 2469f48..3fe7038 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
|
2015-05-22 13:52:56 +00:00
|
|
|
@@ -417,7 +417,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
|
|
d15 = d11 * d11 + d12 * d12 + d13 * d13;
|
|
|
|
boolean flag1 = false;
|
2014-07-22 20:25:09 +00:00
|
|
|
|
2015-05-22 13:52:56 +00:00
|
|
|
- if (d15 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
|
|
|
+ // Spigot: make "moved wrongly" limit configurable
|
|
|
|
+ if (d15 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
|
|
|
flag1 = true;
|
|
|
|
PlayerConnection.c.warn(this.player.getName() + " moved wrongly!");
|
|
|
|
}
|
2014-07-22 20:25:09 +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 921d7d5..7e774f2 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
|
2015-05-25 19:09:58 +00:00
|
|
|
@@ -334,4 +334,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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-05-25 19:09:58 +00:00
|
|
|
1.9.0.msysgit.0
|
2014-07-30 08:35:19 +00:00
|
|
|
|