Fix MCUtils and other calls to postTaskOnMain
Method changed changed it's role to providing a TickTask object which isn't automatically scheduled onto the server
This commit is contained in:
@@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing
|
||||
random disconnections for clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 7a4b14f865..de34c4e3ee 100644
|
||||
index 7a4b14f86..2dd092f0a 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 {
|
||||
@@ -32,7 +32,7 @@ index 7a4b14f865..de34c4e3ee 100644
|
||||
} else if (!this.isExemptPlayer()) {
|
||||
- this.disconnect(new ChatMessage("disconnect.timeout", new Object[0]));
|
||||
+ // Paper start - This needs to be handled on the main thread for plugins
|
||||
+ minecraftServer.postToMainThread(() -> {
|
||||
+ minecraftServer.scheduleOnMain(() -> {
|
||||
+ this.disconnect(new ChatMessage("disconnect.timeout"));
|
||||
+ });
|
||||
+ // Paper end
|
||||
|
||||
Reference in New Issue
Block a user