The disconnect on packet spam must be called sync (#1452)

And it was called twice, probably forgotten in the patch.
This commit is contained in:
Brokkonaut
2018-09-18 04:04:47 +02:00
parent fda3e873f6
commit af737481c2
5 changed files with 7 additions and 7 deletions

View File

@@ -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 23c07ca5c..b04eae4bb 100644
index 23c07ca5c..f8a47ceb9 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;
@@ -33,7 +33,7 @@ index 23c07ca5c..b04eae4bb 100644
+ // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
// CraftBukkit start
if (chatSpamField.addAndGet(this, 1) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
this.disconnect(new ChatMessage("disconnect.spam", new Object[0]));
- this.disconnect(new ChatMessage("disconnect.spam", new Object[0]));
+ minecraftServer.postToMainThread(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper
return;
}