Cleanup our patches
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Thu, 24 Jul 2014 22:19:44 -0500
|
||||
Date: Tue, 5 Aug 2014 17:56:02 -0500
|
||||
Subject: [PATCH] Toggle for player interact limiter
|
||||
|
||||
|
||||
@@ -8,21 +8,13 @@ diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main
|
||||
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 @@ import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
// CraftBukkit end
|
||||
|
||||
+import org.github.paperspigot.PaperSpigotConfig; // PaperSpigot
|
||||
+
|
||||
public class PlayerConnection implements PacketPlayInListener {
|
||||
|
||||
private static final Logger c = LogManager.getLogger();
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
|
||||
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
|
||||
boolean throttled = false;
|
||||
- if (lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) {
|
||||
+ if (PaperSpigotConfig.interactLimitEnabled && lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) {
|
||||
+ // PaperSpigot - Allow disabling the player interaction limiter
|
||||
+ if (org.github.paperspigot.PaperSpigotConfig.interactLimitEnabled && lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) {
|
||||
throttled = true;
|
||||
} else if ( packetplayinblockplace.timestamp - lastPlace >= 30 || lastPlace == -1 )
|
||||
{
|
||||
@@ -31,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- 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
|
||||
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this might be bad depending on your plugins" );
|
||||
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" );
|
||||
}
|
||||
}
|
||||
+
|
||||
@@ -39,6 +31,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private static void interactLimitEnabled()
|
||||
+ {
|
||||
+ interactLimitEnabled = getBoolean( "settings.limit-player-interactions", true );
|
||||
+ if (!interactLimitEnabled) {
|
||||
+ Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" );
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
--
|
||||
Reference in New Issue
Block a user