Upstream merge - remove movement limit
This commit is contained in:
2
Bukkit
2
Bukkit
Submodule Bukkit updated: 5a55230151...7c0fc96e9e
Submodule CraftBukkit updated: 32f89aac85...b734927224
@@ -1,35 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
||||||
Date: Thu, 3 Jul 2014 19:23:27 -0500
|
|
||||||
Subject: [PATCH] Configurable movement limit restriction
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
||||||
|
|
||||||
public void a(PacketPlayInFlying packetplayinflying) {
|
|
||||||
// Spigot start - throttle
|
|
||||||
- if ( ++movementPackets >= 5 )
|
|
||||||
+ if ( ++movementPackets >= PaperSpigotConfig.movementLimit ) // PaperSpigot - Configurable movement limit restriction
|
|
||||||
{
|
|
||||||
Player player = this.getPlayer();
|
|
||||||
Location curPos = player.getLocation();
|
|
||||||
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
||||||
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
||||||
@@ -0,0 +0,0 @@ public class PaperSpigotConfig
|
|
||||||
{
|
|
||||||
interactLimit = getInt( "settings.player-interaction-limit", 2 );
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ public static int movementLimit;
|
|
||||||
+ private static void movementLimit()
|
|
||||||
+ {
|
|
||||||
+ movementLimit = getInt( "settings.player-movement-limit", 5 );
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
--
|
|
||||||
Reference in New Issue
Block a user