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); + }