mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@9b1798d6 Simplify custom payload handling (#12347) PaperMC/Paper@db8c646d Merge remote-tracking branch 'origin/main' into update/1.21.5
This commit is contained in:
@@ -33,18 +33,20 @@
|
||||
if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
|
||||
int i = (int)(Util.getMillis() - this.keepAliveTime);
|
||||
this.latency = (this.latency * 3 + i) / 4;
|
||||
@@ -159,6 +_,10 @@
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn't register custom payload", ex);
|
||||
this.disconnect(Component.literal("Invalid payload REGISTER!"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause
|
||||
@@ -169,6 +_,12 @@
|
||||
return;
|
||||
}
|
||||
+ // Purpur start - Purpur client support
|
||||
+ } else if (identifier.equals(PURPUR_CLIENT)) {
|
||||
+ player.purpurClient = true;
|
||||
+ // Purpur end - Purpur client support
|
||||
} else if (identifier.equals(ServerCommonPacketListenerImpl.CUSTOM_UNREGISTER)) {
|
||||
try {
|
||||
String channels = payload.toString(java.nio.charset.StandardCharsets.UTF_8);
|
||||
@@ -238,6 +_,22 @@
|
||||
|
||||
+ // Purpur start - Purpur client support
|
||||
+ if (identifier.equals(PURPUR_CLIENT)) {
|
||||
+ this.player.purpurClient = true;
|
||||
+ }
|
||||
+ // Purpur end - Purpur client support
|
||||
+
|
||||
if (identifier.equals(MINECRAFT_BRAND)) {
|
||||
this.player.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256);
|
||||
}
|
||||
@@ -242,6 +_,22 @@
|
||||
// Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
||||
final long elapsedTime = millis - this.keepAliveTime;
|
||||
|
||||
Reference in New Issue
Block a user