diff options
author | 96DarkCode96 <[email protected]> | 2024-12-11 19:29:51 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-11 19:29:51 +0100 |
commit | 4803421326fca1ba974d52844d882d1912ad62a3 (patch) | |
tree | e9b03d651b71ae5bf48aa8e2e0f16ce496306b4a /patches/server/1034-Fix-Player.setPlayerListOrder-to-send-update-to-clie.patch | |
parent | 8dc76e715261f97bbf4a3f254e123aae08588ad5 (diff) | |
download | Paper-4803421326fca1ba974d52844d882d1912ad62a3.tar.gz Paper-4803421326fca1ba974d52844d882d1912ad62a3.zip |
Fix Player.setPlayerListOrder to send update to clients (#11729)
Diffstat (limited to 'patches/server/1034-Fix-Player.setPlayerListOrder-to-send-update-to-clie.patch')
-rw-r--r-- | patches/server/1034-Fix-Player.setPlayerListOrder-to-send-update-to-clie.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/server/1034-Fix-Player.setPlayerListOrder-to-send-update-to-clie.patch b/patches/server/1034-Fix-Player.setPlayerListOrder-to-send-update-to-clie.patch new file mode 100644 index 0000000000..a42c19217e --- /dev/null +++ b/patches/server/1034-Fix-Player.setPlayerListOrder-to-send-update-to-clie.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: 96DarkCode96 <[email protected]> +Date: Tue, 10 Dec 2024 15:45:47 +0100 +Subject: [PATCH] Fix Player.setPlayerListOrder to send update to clients + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index d5dc10cf9440f2394e6548c6a3e0160df13c9cae..e9df37ff66700278bc94ea1e42135b92d97d03f7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -606,6 +606,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + Preconditions.checkArgument(order >= 0, "order cannot be negative"); + + this.getHandle().listOrder = order; ++ // Paper start - Send update packet ++ if (getHandle().connection == null) return; // Updates are possible before the player has fully joined ++ for (ServerPlayer player : server.getHandle().players) { ++ if (player.getBukkitEntity().canSee(this)) { ++ player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LIST_ORDER, getHandle())); ++ } ++ } ++ // Paper end - Send update packet + } + + private net.kyori.adventure.text.Component playerListHeader; // Paper - Adventure |