geforkt von Mirrors/Paper
28414e7e28
6669d6ecd2b b2740df50bb bf71dc61149 fba27a2ea80 92ee7e7f8ec b28f0d3de23 4beb4ac3918 0ddb6f3dde8 afe301fe892 b8f6402bbbe
39 Zeilen
2.2 KiB
Diff
39 Zeilen
2.2 KiB
Diff
From 453d7cec49ec898286b82e4d4467ffb8d733bea8 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 73477ee..abcb3cd 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -379,7 +379,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
// CraftBukkit end
|
|
double d17 = d14 * d14 + d15 * d15 + d16 * d16;
|
|
|
|
- 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
|
|
+ // Spigot: make "moved too quickly" limit configurable
|
|
+ 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);
|
|
return;
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
index 759a95a..8233de7 100644
|
|
--- 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 );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|