2014-11-30 23:16:48 +01:00
|
|
|
From 404e7af8294bcfa7a3267133c0c0e9708713f63e Mon Sep 17 00:00:00 2001
|
2014-07-22 22:25:09 +02: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-11-30 23:16:48 +01:00
|
|
|
index a3e4438..3246c0f 100644
|
2014-07-22 22:25:09 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2014-11-29 01:06:26 +01:00
|
|
|
@@ -405,7 +405,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
2014-11-28 02:17:45 +01:00
|
|
|
d17 = d11 * d11 + d12 * d12 + d13 * d13;
|
2014-07-22 22:25:09 +02:00
|
|
|
boolean flag1 = false;
|
|
|
|
|
2014-11-28 02:17:45 +01:00
|
|
|
- if (d17 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
2014-07-22 22:25:09 +02:00
|
|
|
+ // Spigot: make "moved wrongly" limit configurable
|
2014-11-28 02:17:45 +01:00
|
|
|
+ if (d17 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
2014-07-22 22:25:09 +02:00
|
|
|
flag1 = true;
|
2014-11-28 02:17:45 +01:00
|
|
|
PlayerConnection.c.warn(this.player.getName() + " moved wrongly!");
|
2014-07-22 22:25:09 +02:00
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-11-28 02:17:45 +01:00
|
|
|
index c5e995b..759a95a 100644
|
2014-07-22 22:25:09 +02:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-07-27 21:14:24 +02:00
|
|
|
@@ -333,4 +333,10 @@ public class SpigotConfig
|
2014-07-22 22:25:09 +02:00
|
|
|
{
|
|
|
|
intCacheLimit = getInt( "settings.int-cache-limit", 1024 );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static double movedWronglyThreshold;
|
|
|
|
+ private static void movedWronglyThreshold()
|
|
|
|
+ {
|
|
|
|
+ movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-30 10:35:19 +02:00
|
|
|
|