aeead930a1
Drops the item Applies to all Falling Block Entities
47 lines
2.1 KiB
Diff
47 lines
2.1 KiB
Diff
From 3a2f833cbbc263cd50e7a3cdb01c909cc32a7377 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <Zbob750@live.com>
|
|
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 97037ff..43bce01 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;
|
|
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();
|
|
@@ -581,7 +583,7 @@ 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) {
|
|
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 f7dc787..ec800c3 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
|
@@ -140,4 +140,10 @@ public class PaperSpigotConfig
|
|
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this might be bad depending on your plugins" );
|
|
}
|
|
}
|
|
+
|
|
+ public static boolean interactLimitEnabled;
|
|
+ private static void interactLimitEnabled()
|
|
+ {
|
|
+ interactLimitEnabled = getBoolean( "settings.limit-player-interactions", true );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|