mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 23:29:32 +01:00
Update CB
This commit is contained in:
parent
3f410b6ccf
commit
5ad02bdff5
4 changed files with 12 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
From 22042b6f93f69819fdf97be7c12519f630ef0678 Mon Sep 17 00:00:00 2001
|
||||
From 1bf37ceccc4d3884c1ea59244e331eb003db6e68 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 26 Nov 2017 13:19:58 -0500
|
||||
Subject: [PATCH] AsyncTabCompleteEvent
|
||||
|
@ -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
|
||||
@@ -10,6 +10,7 @@ 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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From aa104cbbb0974ec67151d8f2a6250668ede5f6f4 Mon Sep 17 00:00:00 2001
|
||||
From a5151ecd618a9fce62bccfc2b87a6de0f8654825 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 29 Jul 2018 05:02:15 +0100
|
||||
Subject: [PATCH] Break up and make tab spam limits configurable
|
||||
|
@ -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
|
||||
@@ -327,4 +327,18 @@ 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
|
||||
@@ -78,6 +78,7 @@ 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,4 +1,4 @@
|
|||
From d4c5e43320dbff2bf15ef805d550dcdbaf078273 Mon Sep 17 00:00:00 2001
|
||||
From 006cad4ccde51529cf1760828d99ad11d7fd24c1 Mon Sep 17 00:00:00 2001
|
||||
From: miclebrick <miclebrick@outlook.com>
|
||||
Date: Wed, 8 Aug 2018 15:30:52 -0400
|
||||
Subject: [PATCH] Add Early Warning Feature to WatchDog
|
||||
|
@ -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
|
||||
@@ -24,6 +24,8 @@ 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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1486c295167e8bf63b00a07e281f3e4fa33a21a3
|
||||
Subproject commit 6304ccd95fc9498960e99f96b59479dfc08b3c8d
|
Loading…
Reference in a new issue