Upstream - Don't crash when a skele shoots an item frame
This commit is contained in:
2
Bukkit
2
Bukkit
Submodule Bukkit updated: f2854540c2...0f9d880f80
Submodule CraftBukkit updated: dc0b6f5e82...bc6d8b3353
@@ -1,11 +1,11 @@
|
||||
From befb63a6e184c5e62c0af232d5860344e8cdfc36 Mon Sep 17 00:00:00 2001
|
||||
From 42e3c45e2ab734d4d22081e4f19dc594d7a7d621 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <Zbob750@live.com>
|
||||
Date: Thu, 3 Jul 2014 00:53:47 -0500
|
||||
Subject: [PATCH] Configurable interaction limit restriction
|
||||
Date: Fri, 11 Jul 2014 08:17:00 -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 8485d6b..e587e6f 100644
|
||||
index 4f7da33..1657c7c 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;
|
||||
@@ -21,13 +21,13 @@ index 8485d6b..e587e6f 100644
|
||||
|
||||
public void a(PacketPlayInBlockPlace packetplayinblockplace) {
|
||||
boolean throttled = false;
|
||||
- if (lastPlace != -1 && MinecraftServer.currentTick - lastPlace < 2) {
|
||||
+ if (lastPlace != -1 && MinecraftServer.currentTick - lastPlace < PaperSpigotConfig.interactLimit) { // PaperSpigot - Configurable interaction limit restriction
|
||||
- if (lastPlace != -1 && MinecraftServer.currentTick - lastPlace < 1) {
|
||||
+ if (lastPlace != -1 && MinecraftServer.currentTick - lastPlace < 1 && PaperSpigotConfig.interactLimitEnabled) { // PaperSpigot - Allow interact limit to be disabled
|
||||
throttled = true;
|
||||
} else
|
||||
{
|
||||
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
||||
index 3131c30..7bda065 100644
|
||||
index 3131c30..092b3d8 100644
|
||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
||||
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
|
||||
@@ -129,4 +129,10 @@ public class PaperSpigotConfig
|
||||
@@ -35,10 +35,10 @@ index 3131c30..7bda065 100644
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public static int interactLimit;
|
||||
+ private static void interactLimit()
|
||||
+ public static boolean interactLimitEnabled;
|
||||
+ private static void interactLimitEnabled()
|
||||
+ {
|
||||
+ interactLimit = getInt( "settings.player-interaction-limit", 2 );
|
||||
+ interactLimitEnabled = getBoolean( "settings.limit-player-interactions", true );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
Reference in New Issue
Block a user