geforkt von Mirrors/Paper
28414e7e28
6669d6ecd2b b2740df50bb bf71dc61149 fba27a2ea80 92ee7e7f8ec b28f0d3de23 4beb4ac3918 0ddb6f3dde8 afe301fe892 b8f6402bbbe
39 Zeilen
1.7 KiB
Diff
39 Zeilen
1.7 KiB
Diff
From 3295048f09613aac6d7cafe007e8304c2271afe7 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index b266f6a..73477ee 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -406,7 +406,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
d17 = d11 * d11 + d12 * d12 + d13 * d13;
|
|
boolean flag1 = false;
|
|
|
|
- if (d17 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
|
+ // Spigot: make "moved wrongly" limit configurable
|
|
+ if (d17 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
|
flag1 = true;
|
|
PlayerConnection.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
|
|
index c5e995b..759a95a 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -333,4 +333,10 @@ public class SpigotConfig
|
|
{
|
|
intCacheLimit = getInt( "settings.int-cache-limit", 1024 );
|
|
}
|
|
+
|
|
+ public static double movedWronglyThreshold;
|
|
+ private static void movedWronglyThreshold()
|
|
+ {
|
|
+ movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|