Paper/CraftBukkit-Patches/0163-Make-moved-too-quickly-limit-configurable.patch
Zach Brown 398f6983bd Update from upstream SpigotMC
Make "moved too quickly" limit configurable SpigotMC/Spigot@99a0a640e8
Undeprecate Player#updateInventory()V SpigotMC/Spigot@5c32e1cb48
Fetch complete profile for skull items, similarly to TileEntitySkull. SpigotMC/Spigot@33d758773e
Move getDouble into the Spigot Configuration patch SpigotMC/Spigot@b5dd202af1
Add missing particle to particle API SpigotMC/Spigot@273c64bbad
Log debug levels to the log file. SpigotMC/Spigot@348eae75f4
Fix PlayerItemDamageEvent (we already had this #badupstreamrelations) SpigotMC/Spigot@e207ea23cd
Move hopper patch to top for PR180 SpigotMC/Spigot@abb775108d
Don't be so spammy on Java 6 SpigotMC/Spigot@5abb82b1ca
Apply NBTReadLimiter to more things SpigotMC/Spigot@408944e9f5
2014-07-27 14:20:28 -05:00

38 lines
2.1 KiB
Diff

From 7ff8738025484544f9c23f3ceeda084b78e1dbc2 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 f064f6e..d8f334a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -371,7 +371,8 @@ public class PlayerConnection implements PacketPlayInListener {
// CraftBukkit end
double d10 = d7 * d7 + d8 * d8 + d9 * d9;
- if (d10 > 100.0D && this.checkMovement && (!this.minecraftServer.N() || !this.minecraftServer.M().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 (d10 > org.spigotmc.SpigotConfig.movedTooQuicklyThreshold && this.checkMovement && (!this.minecraftServer.N() || !this.minecraftServer.M().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
c.warn(this.player.getName() + " moved too quickly! " + d4 + "," + d5 + "," + d6 + " (" + d7 + ", " + d8 + ", " + d9 + ")");
this.a(this.y, this.z, 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 2e6e172..6189566 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 );
+ }
}
--
1.9.1