Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@51d28af8 [ci/skip] Typo in CartographyInventory (#12777)
PaperMC/Paper@6ea679eb Allow listening to plugin messages during configuration phase (#12775)
PaperMC/Paper@c3be00f0 Always call plugin message dispatch on PlayerConnection
PaperMC/Paper@3fec37a9 Move the double call into the dispatch method
PaperMC/Paper@108255cb Reduce PlayerLoginEvent alt behavior nag for now (#12782)
PaperMC/Paper@2141ca52 Port plugins command to brigadier (#12632)
PaperMC/Paper@0cadaefc Fix quitmessage nullability issues (#12783)
This commit is contained in:
granny
2025-07-01 19:03:43 -07:00
parent 591baf2648
commit 2d8cdd15c7
9 changed files with 44 additions and 42 deletions

View File

@@ -13,15 +13,18 @@
private volatile int latency; // Paper - improve keepalives - make volatile
private final io.papermc.paper.util.KeepAlive keepAlive; // Paper - improve keepalives
private volatile boolean suspendFlushingOnServerThread = false;
@@ -53,6 +_,7 @@
@@ -53,6 +_,10 @@
public final java.util.Map<java.util.UUID, net.kyori.adventure.resource.ResourcePackCallback> packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support
+ protected static final net.minecraft.resources.ResourceLocation PURPUR_CLIENT = net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("purpur", "client"); // Purpur - Purpur client support
public @Nullable String playerBrand; // Paper
public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie) {
@@ -94,6 +_,18 @@
+ // Purpur start - Purpur client support
+ protected static final net.minecraft.resources.ResourceLocation PURPUR_CLIENT = net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("purpur", "client");
+ public boolean purpurClient;
+ // Purpur end - Purpur client support
// Paper start - retain certain values
public @Nullable String playerBrand;
public final java.util.Set<String> pluginMessagerChannels;
@@ -98,6 +_,18 @@
// Paper start - improve keepalives
long now = System.nanoTime();
io.papermc.paper.util.KeepAlive.PendingKeepAlive pending = this.keepAlive.pendingKeepAlives.peek();
@@ -40,7 +43,20 @@
if (pending != null && pending.challengeId() == packet.getId()) {
this.keepAlive.pendingKeepAlives.remove(pending);
@@ -179,6 +_,23 @@
@@ -172,6 +_,12 @@
return;
}
+ // Purpur start - Purpur client support
+ if (identifier.equals(PURPUR_CLIENT)) {
+ this.purpurClient = true;
+ }
+ // Purpur end - Purpur client support
+
if (identifier.equals(MINECRAFT_BRAND)) {
this.playerBrand = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256);
}
@@ -251,6 +_,23 @@
Profiler.get().push("keepAlive");
long millis = Util.getMillis();
// Paper start - improve keepalives

View File

@@ -231,16 +231,3 @@
LOGGER.warn(
"Player {} tried to change game mode to {} without required permissions",
this.player.getGameProfile().getName(),
@@ -3747,6 +_,12 @@
readChannelIdentifier(data, startIndex, data.length, registerChannel);
return;
}
+
+ // 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.connection.playerBrand = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256);