mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 06:58:11 +02:00
Configurable movement limit restriction
This commit is contained in:
parent
96c935c9da
commit
31a917241b
@ -1,11 +1,11 @@
|
|||||||
From d734d496e744f843b5980e5a02fae935a9b2c694 Mon Sep 17 00:00:00 2001
|
From 2e5f51f1a7378429dd6855c63c2fa59224a48a7e Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Thu, 3 Jul 2014 00:53:47 -0500
|
Date: Thu, 3 Jul 2014 00:53:47 -0500
|
||||||
Subject: [PATCH] Configurable interaction limit restriction
|
Subject: [PATCH] Configurable interaction limit restriction
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 1221319..f8967f7 100644
|
index afafd62..71878e9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -59,6 +59,8 @@ import org.bukkit.inventory.InventoryView;
|
@@ -59,6 +59,8 @@ import org.bukkit.inventory.InventoryView;
|
||||||
@ -17,7 +17,7 @@ index 1221319..f8967f7 100644
|
|||||||
public class PlayerConnection implements PacketPlayInListener {
|
public class PlayerConnection implements PacketPlayInListener {
|
||||||
|
|
||||||
private static final Logger c = LogManager.getLogger();
|
private static final Logger c = LogManager.getLogger();
|
||||||
@@ -577,7 +579,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
@@ -588,7 +590,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||||
|
|
||||||
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
|
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
|
||||||
boolean throttled = false;
|
boolean throttled = false;
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
From 52f79efa2f8217c0d3dd35f756f8165ca9a60a2c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zach Brown <Zbob750@live.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 71878e9..c6564b6 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
|
@@ -186,7 +186,7 @@ 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 7bda065..49bb6a1 100644
|
||||||
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
||||||
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
||||||
|
@@ -135,4 +135,10 @@ 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 );
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user