mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Move the double call into the dispatch method
At some point later,
This commit is contained in:
@@ -100,7 +100,7 @@ index 962084054c0208470d0c3c99c5dca6327c9b8752..2abc21102bbd2da79dc0c50826cff7da
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index b2b5fe493f71d7300e5009ae0307dbfd8da99991..27b8ce14ad51566155e457279ec3db1c4b755da7 100644
|
||||
index 140f0ac42626662354e9b5386d91f1b096a945a3..2e7c4c74818befd25e296b58ef9f20319544c2fb 100644
|
||||
--- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -38,12 +38,13 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -185,7 +185,7 @@ index b2b5fe493f71d7300e5009ae0307dbfd8da99991..27b8ce14ad51566155e457279ec3db1c
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -224,20 +254,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -220,20 +250,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
protected void keepConnectionAlive() {
|
||||
Profiler.get().push("keepAlive");
|
||||
long millis = Util.getMillis();
|
||||
@@ -223,7 +223,7 @@ index b2b5fe493f71d7300e5009ae0307dbfd8da99991..27b8ce14ad51566155e457279ec3db1c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +450,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -413,6 +446,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
}
|
||||
|
||||
protected CommonListenerCookie createCookie(ClientInformation clientInformation) {
|
||||
|
@@ -48,7 +48,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,8 +_,80 @@
|
||||
@@ -90,8 +_,76 @@
|
||||
public void handlePong(ServerboundPongPacket packet) {
|
||||
}
|
||||
|
||||
@@ -92,11 +92,7 @@
|
||||
+ this.playerBrand = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ this.cserver.getMessenger().dispatchIncomingMessage(paperConnection(), identifier.toString(), data);
|
||||
+ if (this instanceof ServerGamePacketListenerImpl gamePacketListener) {
|
||||
+ this.cserver.getMessenger().dispatchIncomingMessage(gamePacketListener.player.getBukkitEntity(), identifier.toString(), data);
|
||||
+ }
|
||||
+ } catch (final Exception e) {
|
||||
+ ServerGamePacketListenerImpl.LOGGER.error("Couldn't handle custom payload on channel {}", identifier, e);
|
||||
+ this.disconnect(net.minecraft.network.chat.Component.literal("Invalid custom payload payload!"), io.papermc.paper.connection.DisconnectionReason.INVALID_PAYLOAD); // Paper - kick event cause
|
||||
|
@@ -99,7 +99,7 @@
|
||||
this.connection.send(new ClientboundDisconnectPacket(DISCONNECT_REASON_INVALID_DATA));
|
||||
this.connection.disconnect(DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
@@ -180,4 +_,35 @@
|
||||
@@ -180,4 +_,29 @@
|
||||
this.startNextTask();
|
||||
}
|
||||
}
|
||||
@@ -119,11 +119,6 @@
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public io.papermc.paper.connection.ReadablePlayerCookieConnectionImpl getCookieConnection() {
|
||||
+ return this.paperConnection;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void handleCustomPayload(net.minecraft.network.protocol.common.ServerboundCustomPayloadPacket packet) {
|
||||
+ super.handleCustomPayload(packet);
|
||||
+ }
|
||||
@@ -132,6 +127,5 @@
|
||||
+ public io.papermc.paper.connection.PaperPlayerConfigurationConnection paperConnection() {
|
||||
+ return paperConnection;
|
||||
+ }
|
||||
+
|
||||
+ // Paper end
|
||||
}
|
||||
|
@@ -2610,7 +2610,7 @@
|
||||
if (!this.receivedMovementThisTick) {
|
||||
this.player.setKnownMovement(Vec3.ZERO);
|
||||
}
|
||||
@@ -2078,4 +_,97 @@
|
||||
@@ -2078,4 +_,92 @@
|
||||
interface EntityInteraction {
|
||||
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
|
||||
}
|
||||
@@ -2698,11 +2698,6 @@
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public io.papermc.paper.connection.ReadablePlayerCookieConnectionImpl getCookieConnection() {
|
||||
+ return this.playerGameConnection;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public io.papermc.paper.connection.PaperPlayerGameConnection paperConnection() {
|
||||
+ return this.playerGameConnection;
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user