mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 19:12:22 +01:00
c3318769cd
By: md_5 <git@md-5.net>
56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
--- a/net/minecraft/network/Connection.java
|
|
+++ b/net/minecraft/network/Connection.java
|
|
@@ -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 @@
|
|
private volatile DisconnectionDetails delayedDisconnect;
|
|
@Nullable
|
|
BandwidthDebugMonitor bandwidthDebugMonitor;
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
public Connection(PacketFlow side) {
|
|
this.receiving = side;
|
|
@@ -176,6 +181,7 @@
|
|
|
|
}
|
|
}
|
|
+ if (net.minecraft.server.MinecraftServer.getServer().isDebugging()) throwable.printStackTrace(); // Spigot
|
|
}
|
|
|
|
protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet<?> packet) {
|
|
@@ -205,7 +211,7 @@
|
|
}
|
|
|
|
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) {
|
|
@@ -469,7 +475,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 = disconnectionInfo;
|
|
}
|
|
|
|
@@ -537,7 +543,7 @@
|
|
}
|
|
|
|
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);
|
|
}
|