PaperMC/Spigot-Server-Patches/0347-Fix-CB-call-to-changed-postToMainThread-method.patch
Riley Park 9907cedecb
New chat events for better Adventure support (#5289)
Bump Adventure to 4.6.0

fixes #5216
fixes #5261
fixes #5287
2021-03-01 19:07:12 -08:00

19 lines
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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 33a99669e5f9d85e150a7a3841a5e7da24142184..9886ccda757a150d00c914a017ddd7a43167a6bd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -299,7 +299,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.networkManager.getClass();
// CraftBukkit - Don't wait
- minecraftserver.postToMainThread(networkmanager::handleDisconnection);
+ minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper
}
private <T> void a(T t0, Consumer<T> consumer, BiFunction<ITextFilter, T, CompletableFuture<Optional<T>>> bifunction) {