mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Fix Player.setPlayerListOrder to send update to clients
This commit is contained in:
parent
24f63384b2
commit
2837612191
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue