f7bb4ad8a3
Included Commits: Update IRC channel to irc.spi.gt SpigotMC/Spigot@a791c555e7 Remove inv close patch for now SpigotMC/Spigot@a3abb3bea9 Limit TNT Detonations per tick SpigotMC/Spigot@8f9c601aed Use sane default config values SpigotMC/Spigot@1cbbb9b62e These commits were not included as they were quickly reverted: Only close if we are actually placing a block SpigotMC/Spigot@ea0b1b2d67 Revert for the above SpigotMC/Spigot@28faa0bd20 Add isUnbreakable and setUnbreakable to ItemMeta. Also fixes a bug wh... SpigotMC/Spigot@32e6d74a5f Revert for the above SpigotMC/Spigot@4b5a26b11c
41 lines
2 KiB
Diff
41 lines
2 KiB
Diff
From 834a42d90501c4711a915d35b1a5df45212296dc Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <Zbob750@live.com>
|
|
Date: Tue, 5 Aug 2014 17:56:02 -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 188393c..0987b90 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -581,7 +581,8 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
|
|
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
|
|
boolean throttled = false;
|
|
- if (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 )
|
|
{
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
index 2cc159b..25a94a6 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
@@ -152,4 +152,13 @@ public class PaperSpigotConfig
|
|
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" );
|
|
}
|
|
}
|
|
+
|
|
+ public static boolean interactLimitEnabled;
|
|
+ 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" );
|
|
+ }
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|