Skip to content

Commit 4803421

Browse files
authored
Fix Player.setPlayerListOrder to send update to clients (#11729)
1 parent 8dc76e7 commit 4803421

File tree

43 files changed

+29
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+29
-4
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: 96DarkCode96 <96darkcode96@gmail.com>
3+
Date: Tue, 10 Dec 2024 15:45:47 +0100
4+
Subject: [PATCH] Fix Player.setPlayerListOrder to send update to clients
5+
6+
7+
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
8+
index d5dc10cf9440f2394e6548c6a3e0160df13c9cae..e9df37ff66700278bc94ea1e42135b92d97d03f7 100644
9+
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
10+
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
11+
@@ -606,6 +606,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
12+
Preconditions.checkArgument(order >= 0, "order cannot be negative");
13+
14+
this.getHandle().listOrder = order;
15+
+ // Paper start - Send update packet
16+
+ if (getHandle().connection == null) return; // Updates are possible before the player has fully joined
17+
+ for (ServerPlayer player : server.getHandle().players) {
18+
+ if (player.getBukkitEntity().canSee(this)) {
19+
+ player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LIST_ORDER, getHandle()));
20+
+ }
21+
+ }
22+
+ // Paper end - Send update packet
23+
}
24+
25+
private net.kyori.adventure.text.Component playerListHeader; // Paper - Adventure

patches/server/1034-Fix-incorrect-command-serialization-by-creating-new-.patch renamed to patches/server/1035-Fix-incorrect-command-serialization-by-creating-new-.patch

File renamed without changes.
File renamed without changes.

patches/server/1036-Switch-Impl-types-to-Holderable.patch renamed to patches/server/1037-Switch-Impl-types-to-Holderable.patch

File renamed without changes.

patches/server/1037-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch renamed to patches/server/1038-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch

File renamed without changes.

patches/server/1038-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch renamed to patches/server/1039-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch

File renamed without changes.

patches/server/1039-Optimize-Network-Manager-and-add-advanced-packet-sup.patch renamed to patches/server/1040-Optimize-Network-Manager-and-add-advanced-packet-sup.patch

File renamed without changes.

patches/server/1040-Allow-Saving-of-Oversized-Chunks.patch renamed to patches/server/1041-Allow-Saving-of-Oversized-Chunks.patch

File renamed without changes.

patches/server/1041-Flat-bedrock-generator-settings.patch renamed to patches/server/1042-Flat-bedrock-generator-settings.patch

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)