Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -12,7 +12,7 @@
public class PlayerConnectionUtils {
private static final Logger LOGGER = LogManager.getLogger();
@@ -18,6 +23,7 @@
@@ -20,6 +25,7 @@
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
if (!iasynctaskhandler.isMainThread()) {
iasynctaskhandler.execute(() -> {
@@ -20,13 +20,13 @@
if (t0.a().isConnected()) {
packet.a(t0);
} else {
@@ -26,6 +32,10 @@
@@ -28,6 +34,10 @@
});
throw CancelledPacketHandleException.INSTANCE;
throw CancelledPacketHandleException.RUNNING_ON_DIFFERENT_THREAD;
+ // CraftBukkit start - SPIGOT-5477, MC-142590
+ } else if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) {
+ throw CancelledPacketHandleException.INSTANCE;
+ throw CancelledPacketHandleException.RUNNING_ON_DIFFERENT_THREAD;
+ // CraftBukkit end
}
}