From 19599e41d1ec6445b96f6f34b080add2de17219b Mon Sep 17 00:00:00 2001 From: brickmonster <92665597+brickmonster@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:17:33 +0000 Subject: [PATCH] Add missing UPDATE_HAT and UPDATE_LIST_ORDER to some paper-added functions in ClientboundPlayerInfoUpdatePacket (#11731) --- .../server/Add-Listing-API-for-Player.patch | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/patches/server/Add-Listing-API-for-Player.patch b/patches/server/Add-Listing-API-for-Player.patch index c18fe40a0a..d37b4db57d 100644 --- a/patches/server/Add-Listing-API-for-Player.patch +++ b/patches/server/Add-Listing-API-for-Player.patch @@ -32,7 +32,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - Add Listing API for Player + public static ClientboundPlayerInfoUpdatePacket createPlayerInitializing(Collection players, ServerPlayer forPlayer) { -+ final EnumSet enumSet = EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ClientboundPlayerInfoUpdatePacket.Action.INITIALIZE_CHAT, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LATENCY, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME); ++ final EnumSet enumSet = EnumSet.of( ++ ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ++ ClientboundPlayerInfoUpdatePacket.Action.INITIALIZE_CHAT, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LATENCY, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_HAT, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LIST_ORDER ++ ); + final List entries = new java.util.ArrayList<>(players.size()); + final org.bukkit.craftbukkit.entity.CraftPlayer bukkitEntity = forPlayer.getBukkitEntity(); + for (final ServerPlayer player : players) { @@ -42,7 +51,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + public static ClientboundPlayerInfoUpdatePacket createSinglePlayerInitializing(ServerPlayer player, boolean listed) { -+ final EnumSet enumSet = EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ClientboundPlayerInfoUpdatePacket.Action.INITIALIZE_CHAT, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LATENCY, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME); ++ final EnumSet enumSet = EnumSet.of( ++ ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ++ ClientboundPlayerInfoUpdatePacket.Action.INITIALIZE_CHAT, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LATENCY, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_HAT, ++ ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LIST_ORDER ++ ); + final List entries = List.of(new Entry(player, listed)); + return new ClientboundPlayerInfoUpdatePacket(enumSet, entries); + }