PaperMC/paper-server/nms-patches/net/minecraft/network/NetworkManager.patch

21 lines
781 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -168,7 +168,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) {
@@ -280,7 +280,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;
}