38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
--- a/net/minecraft/network/NetworkManager.java
|
|
+++ b/net/minecraft/network/NetworkManager.java
|
|
@@ -113,6 +113,7 @@
|
|
private volatile DisconnectionDetails delayedDisconnect;
|
|
@Nullable
|
|
BandwidthDebugMonitor bandwidthDebugMonitor;
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
|
this.receiving = enumprotocoldirection;
|
|
@@ -204,7 +205,7 @@
|
|
}
|
|
|
|
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
|
|
- packet.handle(packetlistener);
|
|
+ packet.handle((T) packetlistener); // CraftBukkit - decompile error
|
|
}
|
|
|
|
private void validateListener(ProtocolInfo<?> protocolinfo, PacketListener packetlistener) {
|
|
@@ -331,7 +332,7 @@
|
|
this.flushQueue();
|
|
this.sendPacket(packet, packetsendlistener, flag);
|
|
} else {
|
|
- this.pendingActions.add((Consumer) (networkmanager) -> {
|
|
+ this.pendingActions.add((networkmanager) -> { // CraftBukkit - decompile error
|
|
networkmanager.sendPacket(packet, packetsendlistener, flag);
|
|
});
|
|
}
|
|
@@ -467,7 +468,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.disconnectionDetails = disconnectiondetails;
|
|
}
|
|
|