PaperMC/paper-server/nms-patches/net/minecraft/network/NetworkManager.patch
CraftBukkit/Spigot 8a3c8cfcd4 Update to Minecraft 1.20.2
By: md_5 <git@md-5.net>
2023-09-22 02:40:00 +10:00

28 lines
1 KiB
Diff

--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -105,6 +105,7 @@
private volatile IChatBaseComponent delayedDisconnect;
@Nullable
BandwidthDebugMonitor bandwidthDebugMonitor;
+ public String hostname = ""; // CraftBukkit - add field
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
this.receiving = enumprotocoldirection;
@@ -194,7 +195,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 suspendInboundAfterProtocolChange() {
@@ -421,7 +422,7 @@
}
if (this.isConnected()) {
- this.channel.close().awaitUninterruptibly();
+ this.channel.close(); // We can't wait as this may be called from an event loop.
this.disconnectedReason = ichatbasecomponent;
}