Paper/patches/server/0305-Fix-CB-call-to-changed-postToMainThread-method.patch
2023-06-07 22:26:06 -07:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 10 May 2019 18:38:19 +0100
Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f3f75fb24f4ddf145a08988848ad97c12a20445d..5df917c81bab831f8bc5a63c201be4150922d5ae 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -515,7 +515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Objects.requireNonNull(this.connection);
// CraftBukkit - Don't wait
- minecraftserver.wrapRunnable(networkmanager::handleDisconnection);
+ minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper
}
private <T, R> CompletableFuture<R> filterTextPacket(T text, BiFunction<TextFilter, T, CompletableFuture<R>> filterer) {