mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 13:21:24 +01:00
Update CB
This commit is contained in:
parent
566eb11b2e
commit
b39ff2b12d
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
|
||||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 046bf33f66..b23d45f7df 100644
|
||||
index cc2e4ad3bd..54f088c242 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.configuration.InvalidConfigurationException;
|
||||
@ -33,7 +33,7 @@ index 046bf33f66..b23d45f7df 100644
|
||||
+ WatchdogThread.doStart(SpigotConfig.timeoutTime, SpigotConfig.restartOnCrash );
|
||||
+ }
|
||||
+
|
||||
public static int tabSpamIncrement = 2;
|
||||
public static int tabSpamIncrement = 1;
|
||||
public static int tabSpamLimit = 500;
|
||||
private static void tabSpamLimiters() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
|
@ -14,7 +14,7 @@ completion, such as offline players.
|
||||
Also adds isCommand and getLocation to the sync TabCompleteEvent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 5ffe4b374e..b296f948ef 100644
|
||||
index 08f645de1c..b4e5d751e4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ import io.netty.util.concurrent.Future;
|
||||
@ -32,7 +32,7 @@ index 5ffe4b374e..b296f948ef 100644
|
||||
- PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer());
|
||||
+ // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
if (chatSpamField.addAndGet(this, 2) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
|
||||
if (chatSpamField.addAndGet(this, 1) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
|
||||
this.disconnect(new ChatMessage("disconnect.spam", new Object[0]));
|
||||
+ minecraftServer.postToMainThread(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper
|
||||
return;
|
||||
|
@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
|
||||
plugins doing unsafe things.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index c457d07110..046bf33f66 100644
|
||||
index c457d07110..cc2e4ad3bd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
@ -30,7 +30,7 @@ index c457d07110..046bf33f66 100644
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public static int tabSpamIncrement = 2;
|
||||
+ public static int tabSpamIncrement = 1;
|
||||
+ public static int tabSpamLimit = 500;
|
||||
+ private static void tabSpamLimiters() {
|
||||
+ tabSpamIncrement = getInt("settings.spam-limiter.tab-spam-increment", tabSpamIncrement);
|
||||
@ -45,7 +45,7 @@ index c457d07110..046bf33f66 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 5b3d39133d..906abc6541 100644
|
||||
index 0d58ea1c2b..906abc6541 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@ -68,7 +68,7 @@ index 5b3d39133d..906abc6541 100644
|
||||
public void a(PacketPlayInTabComplete packetplayintabcomplete) {
|
||||
// PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
- if (chatSpamField.addAndGet(this, 2) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
|
||||
- if (chatSpamField.addAndGet(this, 1) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
|
||||
+ if (tabSpamLimiter.addAndGet(com.destroystokyo.paper.PaperConfig.tabSpamIncrement) > com.destroystokyo.paper.PaperConfig.tabSpamLimit && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) { // Paper start - split and make configurable
|
||||
this.disconnect(new ChatMessage("disconnect.spam", new Object[0]));
|
||||
minecraftServer.postToMainThread(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1486c295167e8bf63b00a07e281f3e4fa33a21a3
|
||||
Subproject commit 6304ccd95fc9498960e99f96b59479dfc08b3c8d
|
Loading…
Reference in New Issue
Block a user