2021-03-16 09:00:00 +11:00
|
|
|
--- a/net/minecraft/network/NetworkManager.java
|
|
|
|
+++ b/net/minecraft/network/NetworkManager.java
|
2023-03-15 03:30:00 +11:00
|
|
|
@@ -86,6 +86,7 @@
|
2022-10-28 20:19:11 +11:00
|
|
|
private float averageSentPackets;
|
|
|
|
private int tickCount;
|
|
|
|
private boolean handlingFault;
|
|
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
|
|
|
|
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
|
|
|
this.receiving = enumprotocoldirection;
|
2023-03-15 03:30:00 +11:00
|
|
|
@@ -167,7 +168,7 @@
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
|
|
|
|
2021-11-22 09:00:00 +11:00
|
|
|
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
|
|
|
|
- packet.handle(packetlistener);
|
|
|
|
+ packet.handle((T) packetlistener); // CraftBukkit - decompile error
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
|
|
|
|
2021-11-22 09:00:00 +11:00
|
|
|
public void setListener(PacketListener packetlistener) {
|
2023-03-15 03:30:00 +11:00
|
|
|
@@ -296,7 +297,7 @@
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2021-11-22 09:00:00 +11:00
|
|
|
public void disconnect(IChatBaseComponent ichatbasecomponent) {
|
2015-05-05 21:43:47 +01:00
|
|
|
if (this.channel.isOpen()) {
|
|
|
|
- this.channel.close().awaitUninterruptibly();
|
|
|
|
+ this.channel.close(); // We can't wait as this may be called from an event loop.
|
2021-06-11 15:00:00 +10:00
|
|
|
this.disconnectedReason = ichatbasecomponent;
|
2015-02-26 22:41:06 +00:00
|
|
|
}
|
|
|
|
|