@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/network/NetworkManager.java
|
||||
+++ b/net/minecraft/network/NetworkManager.java
|
||||
@@ -114,6 +114,7 @@
|
||||
private volatile IChatBaseComponent delayedDisconnect;
|
||||
private volatile DisconnectionDetails delayedDisconnect;
|
||||
@Nullable
|
||||
BandwidthDebugMonitor bandwidthDebugMonitor;
|
||||
+ public String hostname = ""; // CraftBukkit - add field
|
||||
|
||||
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
||||
this.receiving = enumprotocoldirection;
|
||||
@@ -197,7 +198,7 @@
|
||||
@@ -205,7 +206,7 @@
|
||||
}
|
||||
|
||||
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
|
||||
@@ -17,16 +17,16 @@
|
||||
}
|
||||
|
||||
private void validateListener(ProtocolInfo<?> protocolinfo, PacketListener packetlistener) {
|
||||
@@ -457,7 +458,7 @@
|
||||
@@ -469,7 +470,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;
|
||||
this.disconnectionDetails = disconnectiondetails;
|
||||
}
|
||||
|
||||
@@ -525,7 +526,7 @@
|
||||
@@ -537,7 +538,7 @@
|
||||
}
|
||||
|
||||
public void configurePacketHandler(ChannelPipeline channelpipeline) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/chat/IChatBaseComponent.java
|
||||
+++ b/net/minecraft/network/chat/IChatBaseComponent.java
|
||||
@@ -35,7 +35,22 @@
|
||||
@@ -36,7 +36,22 @@
|
||||
import net.minecraft.util.FormattedString;
|
||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
||||
+++ b/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
||||
@@ -10,6 +10,11 @@
|
||||
@@ -11,6 +11,11 @@
|
||||
import net.minecraft.util.thread.IAsyncTaskHandler;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class PlayerConnectionUtils {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -23,6 +28,7 @@
|
||||
@@ -24,6 +29,7 @@
|
||||
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
|
||||
if (!iasynctaskhandler.isSameThread()) {
|
||||
iasynctaskhandler.executeIfPossible(() -> {
|
||||
|
||||
Reference in New Issue
Block a user