2024-12-11 22:26:55 +01:00
|
|
|
--- a/net/minecraft/network/Connection.java
|
|
|
|
+++ b/net/minecraft/network/Connection.java
|
2014-04-12 13:23:58 +02:00
|
|
|
@@ -96,6 +96,10 @@
|
|
|
|
private final Queue<Consumer<Connection>> pendingActions = Queues.newConcurrentLinkedQueue();
|
|
|
|
public Channel channel;
|
|
|
|
public SocketAddress address;
|
|
|
|
+ // Spigot Start
|
|
|
|
+ public java.util.UUID spoofedUUID;
|
|
|
|
+ public com.mojang.authlib.properties.Property[] spoofedProfile;
|
|
|
|
+ // Spigot End
|
|
|
|
@Nullable
|
|
|
|
private volatile PacketListener disconnectListener;
|
|
|
|
@Nullable
|
|
|
|
@@ -114,6 +118,7 @@
|
2024-12-11 22:26:55 +01:00
|
|
|
private volatile DisconnectionDetails delayedDisconnect;
|
|
|
|
@Nullable
|
|
|
|
BandwidthDebugMonitor bandwidthDebugMonitor;
|
|
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
|
|
|
|
public Connection(PacketFlow side) {
|
|
|
|
this.receiving = side;
|
2014-04-12 13:23:58 +02:00
|
|
|
@@ -205,7 +210,7 @@
|
2024-12-11 22:26:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener listener) {
|
|
|
|
- packet.handle(listener);
|
|
|
|
+ packet.handle((T) listener); // CraftBukkit - decompile error
|
|
|
|
}
|
|
|
|
|
|
|
|
private void validateListener(ProtocolInfo<?> state, PacketListener listener) {
|
2014-04-12 13:23:58 +02:00
|
|
|
@@ -469,7 +474,7 @@
|
2024-12-11 22:26:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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 = disconnectionInfo;
|
|
|
|
}
|
|
|
|
|
2014-04-12 13:23:58 +02:00
|
|
|
@@ -537,7 +542,7 @@
|
2024-12-11 22:26:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void configurePacketHandler(ChannelPipeline pipeline) {
|
|
|
|
- pipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter(this) {
|
|
|
|
+ pipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter() { // CraftBukkit - decompile error
|
|
|
|
public void write(ChannelHandlerContext channelhandlercontext, Object object, ChannelPromise channelpromise) throws Exception {
|
|
|
|
super.write(channelhandlercontext, object, channelpromise);
|
|
|
|
}
|