PaperMC/paper-server/nms-patches/net/minecraft/network/NetworkManager.patch
CraftBukkit/Spigot 40076782ed Update to Minecraft 1.19.4
By: md_5 <git@md-5.net>
2023-03-15 03:30:00 +11:00

28 lines
1.1 KiB
Diff

--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -86,6 +86,7 @@
private float averageSentPackets;
private int tickCount;
private boolean handlingFault;
+ public String hostname = ""; // CraftBukkit - add field
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
this.receiving = enumprotocoldirection;
@@ -167,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) {
@@ -296,7 +297,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;
}