mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
--- a/net/minecraft/network/NetworkManager.java
|
|
+++ b/net/minecraft/network/NetworkManager.java
|
|
@@ -114,6 +114,7 @@
|
|
private volatile IChatBaseComponent delayedDisconnect;
|
|
@Nullable
|
|
BandwidthDebugMonitor bandwidthDebugMonitor;
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
|
this.receiving = enumprotocoldirection;
|
|
@@ -197,7 +198,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) {
|
|
@@ -457,7 +458,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;
|
|
}
|
|
|
|
@@ -525,7 +526,7 @@
|
|
}
|
|
|
|
public void configurePacketHandler(ChannelPipeline channelpipeline) {
|
|
- channelpipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter(this) {
|
|
+ channelpipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter() { // CraftBukkit - decompile error
|
|
public void write(ChannelHandlerContext channelhandlercontext, Object object, ChannelPromise channelpromise) throws Exception {
|
|
super.write(channelhandlercontext, object, channelpromise);
|
|
}
|