PaperMC/paper-server/nms-patches/net/minecraft/network/NetworkManager.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

20 lines
781 B
Diff

--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -156,7 +156,7 @@
}
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
- packet.handle(packetlistener);
+ packet.handle((T) packetlistener); // CraftBukkit - decompile error
}
public void setListener(PacketListener packetlistener) {
@@ -268,7 +268,7 @@
public void disconnect(IChatBaseComponent ichatbasecomponent) {
if (this.channel.isOpen()) {
- this.channel.close().awaitUninterruptibly();
+ this.channel.close(); // We can't wait as this may be called from an event loop.
this.disconnectedReason = ichatbasecomponent;
}