Update from upstream SpigotMC
Don't use Bukkit.getLogger as the CraftServer isn't loaded at this point SpigotMC/Spigot@5c48793ecf Modify the block placement limit to allow for the odd random packet or two SpigotMC/Spigot@7768676ae2
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
From 6e0dd036af4916841749c3a12b968c7b0b56f31b Mon Sep 17 00:00:00 2001
|
||||
From 141d19426334270c18b49625a291185a7d542b36 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <Zbob750@live.com>
|
||||
Date: Wed, 16 Jul 2014 14:11:08 -0500
|
||||
Date: Thu, 24 Jul 2014 22:19:44 -0500
|
||||
Subject: [PATCH] Toggle for player interact limiter
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index f064f6e..f6a1319 100644
|
||||
index cd4f0c9..43c2278 100644
|
||||
--- a/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;
|
||||
@@ -17,14 +17,14 @@ index f064f6e..f6a1319 100644
|
||||
public class PlayerConnection implements PacketPlayInListener {
|
||||
|
||||
private static final Logger c = LogManager.getLogger();
|
||||
@@ -579,7 +581,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
@@ -580,7 +582,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
|
||||
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
|
||||
boolean throttled = false;
|
||||
- if (lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 5) {
|
||||
+ if (lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 5 && PaperSpigotConfig.interactLimitEnabled) {
|
||||
- if (lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) {
|
||||
+ if (PaperSpigotConfig.interactLimitEnabled && lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) {
|
||||
throttled = true;
|
||||
} else
|
||||
} else if ( packetplayinblockplace.timestamp - lastPlace >= 30 || lastPlace == -1 )
|
||||
{
|
||||
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
||||
index f7dc787..ec800c3 100644
|
||||
|
||||
Reference in New Issue
Block a user