# ================================= # Functional interface to process players lists # The system is made mostly to show some of many possibilities of the addon using # # Based on the ConditionalEvents plugin and CE AAPP addon # Asynchronous processing and fault tolerance # # Find any players you want # Using different conditions, sorting, limits, types etc # As well as define your own any information which you want to output about players # Any placeholders from PlaceholderAPI are supported # Almost limitless possibilities # # Where and how can be used? # For example, if in a few clicks you need to: # − find player who was the first player on your server; # − find all players which are currently online and have more than million on their balance; # − find all players which mined more than 30 ancient debris per hour, showing at first online players to check and punish them immediately; # − find first 100 players sorting them by their joining dates; # − find all online players which are currently with donated pickaxes in their inventories to make sure all these pickaxes are legal. # And many many other things. All examples were tested. # # Contact − https://akcel.fun/contacts # # ================================= # # HOW TO USE? # To open the menu - use /pgui command, # this is the only one and the main command. # # How to use the menu you can find in this video https://youtu.be/p9Ymvti1YqY?si=WUvz-rq9tU7PDyqH # # BE SURE, that you have downloaded these PlaceholderAPI expansions: # https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#formatter # https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#string # https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#changeoutput # https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#player # https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#math # # ================================= # # Which functionality of the addon is mostly used in this system? # https://optifynes-organization.gitbook.io/ce-aapp/ce-aapp/actions/independent-actions/change_item # https://optifynes-organization.gitbook.io/ce-aapp/ce-aapp/actions/independent-actions/manage_inventory # https://optifynes-organization.gitbook.io/ce-aapp/ce-aapp/actions/independent-actions/manage_cycle # https://optifynes-organization.gitbook.io/ce-aapp/ce-aapp/placeholders/independent-placeholders/placeholder-for-custom-player-lists # https://optifynes-organization.gitbook.io/ce-aapp/ce-aapp/placeholders/independent-placeholders/placeholder-for-custom-data # https://optifynes-organization.gitbook.io/ce-aapp/ce-aapp/placeholders/independent-placeholders/placeholder-for-processing-arrays # And many more smaller components # # ================================= # ===== OPEN COMMAND ===== # playersListGuiOpenCommand: type: player_command conditions: - '%command% == /pgui' # The main command - '%CEP_customData_tempget_pGUISettingConditions_{player}% == NoData and %CEP_customData_tempget_pGUISettingOutput_{player}% == NoData and %CEP_customData_tempget_pGUISettingSorting_{player}% == NoData and %CEP_customData_tempget_pGUICopyPlayerInfo_{player}% == NoData and %CEP_customData_tempget_pGUIFindPlayer_{player}% == NoData and %CEP_customData_tempget_pGUIChoosePage_{player}% == NoData' # Prevent execution if this command was written while setting/using any menu options - '%CEP_customData_get_pGUIMenuCreated% == NoData execute createMenu' # If menu does not exist, create one - '%CEP_customData_tempget_pGUISave_{player}% == true execute openSaved' # Open already saved menu actions: default: - 'cancel_event: true' - 'manage_inventory: action:open;inventory:PlayersListGUI;target:%player%' # Open the inventory with all functionality to the player (open it the very first, because if use the reset settings button, the menu should be opened before variables setting, so that playersListGuiClose event will clear variable before setting the new variables) - 'execute_action_group: createAndOpenCommon:100' createAndOpenCommon: - 'parse_placeholder: %CEP_customData_tempset_pGUI_true_{player}%' # Set variable which defines that we are using the inventory now - 'parse_placeholder: %CEP_customData_tempset_pGUIListType_ONLINE_{player}%' # Set variable which defines default list type - 'parse_placeholder: %CEP_customData_tempset_pGUIListLimit_20_{player}%' # Set variable which defines default list limit - 'parse_placeholder: %CEP_customData_tempset_pGUIListSorting_NONE_{player}%' # Set variable which defines default list sorting - 'parse_placeholder: %CEP_customData_tempset_pGUIListOutputPointer_0_{player}%' # Set variable which defines default list output information pointer - 'parse_placeholder: %CEP_customData_tempset_pGUIListOutput_§fUUID §7» §a$playerᵕuuid@|§fMoney §7» §a$vaultᵕecoᵕbalanceᵕfixed@\\$|§fGroup §7» §a$vaultᵕgroup@_{player}%' # Set variable which defines default list output information (ᵕ are underscores) - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditionsPointer_0_{player}%' # Set variable which defines default list conditions pointer - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditions_($vaultᵕecoᵕbalanceᵕfixed@>=1000 AND $vaultᵕecoᵕbalanceᵕfixed@<=10000) OR $vaultᵕgroup@==vip_{player}%' # Set variable which defines default list conditions (ᵕ are underscores) - 'parse_placeholder: %CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}{changeoutput_equals_input:{CEP_customData_tempget_pGUIListLimit_{player}}_matcher:-1_ifmatch:_else:_{CEP_customData_tempget_pGUIListLimit_{player}}}_,_{CEP_customData_tempget_pGUIListType_{player}}_{CEP_customData_tempget_pGUIListSorting_{player}}_$player_name@=$player_uuid@=$player_online@={CEP_customData_tempget_pGUIListOutput_{player}}{changeoutput_equals_input:{CEP_customData_tempget_pGUIListConditions_{player}}_matcher:NoData_ifmatch:_else:_{CEP_replaceMulti_>=\\>:<=\\<:|=_{CEP_customData_tempget_pGUIListConditions_{player}}}}%' # Get and save the list of players with all starting default values asynchronously - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=load' # Do different necessary actions only once - 'call_event: playersListGuiClickPreShow' # Start the cycle to check when the list mentioned above will be obtained and we will be able to output it openSaved: - 'cancel_event: true' - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open saved inventory with all functionality to the player - 'parse_placeholder: %CEP_customData_tempset_pGUI_true_{player}%' # Set variable which defines that we are using the inventory now - 'parse_placeholder: %CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}{changeoutput_equals_input:{CEP_customData_tempget_pGUIListLimit_{player}}_matcher:-1_ifmatch:_else:_{CEP_customData_tempget_pGUIListLimit_{player}}}_,_{CEP_customData_tempget_pGUIListType_{player}}_{CEP_customData_tempget_pGUIListSorting_{player}}_$player_name@=$player_uuid@=$player_online@={CEP_customData_tempget_pGUIListOutput_{player}}{changeoutput_equals_input:{CEP_customData_tempget_pGUIListConditions_{player}}_matcher:NoData_ifmatch:_else:_{CEP_replaceMulti_>=\\>:<=\\<:|=_{CEP_customData_tempget_pGUIListConditions_{player}}}}%' # Get and save the list of players with all starting default values asynchronously - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=load' # Do different necessary actions only once - 'call_event: playersListGuiClickPreShow' # Start the cycle to check when the list mentioned above will be obtained and we will be able to output it createMenu: # Create menu the first time if there is no saved menu - 'cancel_event: true' - 'manage_inventory: action:open;target:%player%;typeOrSize:54;title:PLAYERS LISTS UTILITY' - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|0,OPENED|1,OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|9,OPENED|11,OPENED|17,OPENED|19,OPENED|28,OPENED|36,OPENED|38,OPENED|44,OPENED|45,OPENED|46,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53' - 'change_item: action:set;target:%player%;newMaterial:YELLOW_STAINED_GLASS_PANE;slot:OPENED|10;name:§e📝 §fChoose list type...;lore:§7Choose list type easily!||§8§l\| §aONLINE §8» §7OFFLINE §8» §7ALL||§8§l\| §2Left-Click §7to change' - 'change_item: action:set;target:%player%;newMaterial:PINK_STAINED_GLASS_PANE;slot:OPENED|20;name:§d👨 §fMaximum players amount;lore:§7Set limit of players in list!||§8§l\| §fNow §7» §a20||§8§l\| §2Left-Click §7» §f+1 §7(§cRight-Click §7» §f-1§7)|§8§l\| §2Shift + Left-Click §7» §f+10 §7(§cShift + Right-Click §7» §f-10§7)|§8§l\| §eMouse-Click §7» §fALL PLAYERS §7(again §8→ §71 player)' - 'change_item: action:set;target:%player%;newMaterial:PURPLE_STAINED_GLASS_PANE;slot:OPENED|29;name:§5📊 §fOutput information;lore:§7Output necessary information easily!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§a→ §fUUID §7» §a$player_uuid@|§fMoney §7» §a$vault_eco_balance_fixed@$|§fGroup §7» §a$vault_group@|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' - 'change_item: action:set;target:%player%;newMaterial:CYAN_STAINED_GLASS_PANE;slot:OPENED|18;name:§b📈 §fChoose list sorting...;lore:§7Choose how you want to display players!||§8§l\| §aNONE §8» §7AZ §8» §7ZA §8» §7PLACEHOLDER||§8§l\| §2Left-Click §7to change' - 'change_item: action:set;target:%player%;newMaterial:BLUE_STAINED_GLASS_PANE;slot:OPENED|27;name:§9🔑 §fChoose list conditions...;lore:§7Set any conditions you want for players!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§a→ §c§l(§f$vault_eco_balance_fixed@§7>=§f1000|§6§lAND §f$vault_eco_balance_fixed@§7<=§f10000§c§l)|§e§lOR §f$vault_group@§7==§fvip|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' - 'change_item: action:set;target:%player%;newMaterial:LIME_STAINED_GLASS_PANE;slot:OPENED|37;name:§a➵ §fShow players;lore:§7Click to show the list of players!||§8§l\| §2Left-Click §7to show' - 'change_item: action:set;target:%player%;newMaterial:GREEN_STAINED_GLASS_PANE;slot:OPENED|26;name:§2⟳ §fSave settings;lore:§7Click to enable the current settings saving!||§8§l\| §fAll settings will be §2saved §feach time|§8§l\| §fyou §2close §fthis menu.||§8§l\| §2Left-Click §7to enable §7(§cdisabled§7)' - 'change_item: action:set;target:%player%;newMaterial:RED_STAINED_GLASS_PANE;slot:OPENED|35;name:§c❌ §fReset settings;lore:§7Click to reset the current settings!||§8§l\| §fAll settings will be §creset §fright now,|§8§l\| §fas well as §csaving §fdisabled.|§8§l\| §fDo not worry, there is a §cdouble confirmation §f:)||§8§l\| §2Left-Click §7to reset' - 'parse_placeholder: %CEP_customData_set_pGUIMenuCreated_true%' - 'manage_inventory: action:save;inventory:PlayersListGUI;owner:^%player%' - 'execute_action_group: createAndOpenCommon:100' # ===== ACTIONS WHEN CLOSING THE INVENTORY ===== # playersListGuiClose: type: player_close_inventory conditions: - '%CEP_customData_tempget_pGUI_{player}% == true and %CEP_customData_tempget_pGUIShowRealInfoCloseProtection_{player}% == NoData and %CEP_customData_tempget_pGUIFoundPlayersCloseProtection_{player}% == NoData' # Close and clear all data in case if the invetory was closed not while updating players real info or founding the players (almost always closeAndInterrupt below will be executed (and not default) while working with menu and not leaving it totally) - '%CEP_customData_tempget_pGUISettingConditions_{player}% != NoData or %CEP_customData_tempget_pGUISettingOutput_{player}% != NoData or %CEP_customData_tempget_pGUISettingSorting_{player}% != NoData or %CEP_customData_tempget_pGUICopyPlayerInfo_{player}% != NoData or %CEP_customData_tempget_pGUIFindPlayer_{player}% != NoData or %CEP_customData_tempget_pGUIChoosePage_{player}% != NoData execute closeAndInterrupt' # Close, partly clear data and interrupt necessary things - '%CEP_customData_tempget_pGUISave_{player}% == true execute closeButSave' # Close and remain necessary data to save it for next open actions: default: - 'parse_placeholder: %CEP_customData_tempset_pGUIClosedProtection_true_{player}%' # Set temporary variable just in case to certainly prohibit any "async" and/or "cycled" actions from executing - 'execute_action_group: closeCommon:100' # Common tasks - 'parse_placeholder: %CEP_customData_tempremove_pGUI_{player}%' # Remove "inventory" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUISave_{player}%' # Remove "save state" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListType_{player}%' # Remove "list type" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLimit_{player}%' # Remove "list limit" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListSorting_{player}%' # Remove "list sorting" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListOutputPointer_{player}%' # Remove "list output pointer" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListOutput_{player}%' # Remove "list output" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListConditions_{player}%' # Remove "list conditions" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListConditionsPointer_{player}%' # Remove "list conditions pointer" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCurAmount_{player}%' # Remove "current amount of viewable players" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCanBeLoadedAgain_{player}%' # Remove "list can be loaded again" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCurSlot_{player}%' # Remove "current slot in players showing" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLoadingTime_{player}%' # Remove "last list loading time" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindingPlayersLoadingTime_{player}%' # Remove "finding players loading time" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLoaded_{player}%' # Remove "list loaded" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUICurListLength_{player}%' # Remove "list length" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayer_{player}%' # Remove "find player" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayerProcess_{player}%' # Remove "finding player process" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIChoosePage_{player}%' # Remove "choose page" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUICopyPlayerInfo_{player}%' # Remove "copy player info" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoProcess_{player}%' # Remove "real info process" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoNicks_{player}%' # Remove "real info nicks" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayersIndeces_{player}%' # Remove "found players indeces" variable - 'wait_ticks: 1' - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable closeButSave: - 'parse_placeholder: %CEP_customData_tempset_pGUIClosedProtection_true_{player}%' # Set temporary variable just in case to certainly prohibit any "async" and/or "cycled" actions from executing - 'execute_action_group: %changeoutput_contains_input:;{CEP_customData_tempget_pGUIFindPlayerProcess_{player}};{CEP_customData_tempget_pGUIShowRealInfoProcess_{player}};_matcher:true_ifmatch:none_else:saveInventory%:100' - 'execute_action_group: closeCommon:100' # Common tasks - 'parse_placeholder: %CEP_customData_tempremove_pGUI_{player}%' # Remove "inventory" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCurAmount_{player}%' # Remove "current amount of viewable players" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCanBeLoadedAgain_{player}%' # Remove "list can be loaded again" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCurSlot_{player}%' # Remove "current slot in players showing" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLoadingTime_{player}%' # Remove "last list loading time" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindingPlayersLoadingTime_{player}%' # Remove "finding players loading time" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLoaded_{player}%' # Remove "list loaded" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUICurListLength_{player}%' # Remove "list length" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayer_{player}%' # Remove "find player" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayerProcess_{player}%' # Remove "finding player process" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIChoosePage_{player}%' # Remove "choose page" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUICopyPlayerInfo_{player}%' # Remove "copy player info" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoProcess_{player}%' # Remove "real info process" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoNicks_{player}%' # Remove "real info nicks" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayersIndeces_{player}%' # Remove "found players indeces" variable - 'wait_ticks: 1' - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable saveInventory: - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save inventory closeAndInterrupt: - 'parse_placeholder: %CEP_customData_tempset_pGUIClosedProtection_true_{player}%' # Set temporary variable just in case to certainly prohibit any "async" and/or "cycled" actions from executing - 'execute_action_group: closeCommon:100' # Common tasks closeCommon: - 'manage_cycle: SYNC;break;playersListGuiClickShow' # If close the menu, stop loading current page - 'manage_cycle: ASYNC;break;playersListGuiClickLoadingAnimation' # If close the menu, stop loading animation - 'manage_cycle: ASYNC;break;playersListGuiClickSaveRealInfo' # If close the menu, stop saving real info - 'manage_cycle: ASYNC;break;playersListGuiClickFindPlayerProcess1' # If close the menu, stop finding players processes - 'manage_cycle: ASYNC;break;playersListGuiClickFindPlayerProcess2' # If close the menu, stop finding players processes - 'console_command: ce interrupt playersListGuiClick %player% silent:true' # If close the menu, interrupt playersListGuiClick's event wait in preResetSettings actions - 'console_command: ce interrupt playersListGuiClickPreShow %player% silent:true' # If close the menu, interrupt all lists loadings - 'console_command: ce interrupt playersListGuiClickLoadingAnimation %player% silent:true' # If close the menu, interrupt loading animation - 'console_command: ce interrupt playersListGuiClickShowRealInfoWaiting %player% silent:true' # If close the menu, interrupt waiting for real info loading - 'console_command: ce interrupt playersListGuiClickFoundPlayersWaiting %player% silent:true' # If close the menu, interrupt waiting for finding players process - 'console_command: ce interrupt playersListGuiClickFoundPlayersWaitingFinally %player% silent:true' # If close the menu, interrupt another waiting for finding players process - 'console_command: ce interrupt playersListGuiClickFoundPlayersWaitingTimer %player% silent:true' # If close the menu, interrupt finding players waiting timer - 'parse_placeholder: %CEP_list_BREAKASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% %CEP_array_BREAKASYNC:ListLength{CEP_replaceMulti_ᵕ=~_{player}}% %CEP_array_BREAKASYNC:{CEP_replaceMulti_ᵕ=~_{player}}=0% %CEP_array_BREAKASYNC:{CEP_replaceMulti_ᵕ=~_{player}}=1% %CEP_array_BREAKASYNC:{CEP_replaceMulti_ᵕ=~_{player}}=2% %CEP_array_BREAKASYNC:{CEP_replaceMulti_ᵕ=~_{player}}=3% %CEP_array_BREAKASYNC:{CEP_replaceMulti_ᵕ=~_{player}}=4%' # Break all current possible background async tasks like list loading, finding players and list length parsing # ===== ACTIONS WHEN OPENING THE INVENTORY ===== # playersListGuiOpen: type: player_open_inventory conditions: - '%CEP_customData_tempget_pGUI_{player}% == true' # Perform actions if we are still in "menu environment" even if closed the menu - '%CEP_customData_tempget_pGUIFoundPlayers_{player}% != NoData or %CEP_customData_tempget_pGUIShownRealInfo_{player}% != NoData or %CEP_customData_tempget_pGUIListCurSlot_{player}% == NoData execute justReset' # Just reset the protection variable if we still did not load any list OR we are currently in case when we do not need to load list of players again (two cases: found players or shown real info) - '%CEP_customData_tempget_pGUISettingConditions_{player}% != NoData or %CEP_customData_tempget_pGUISettingOutput_{player}% != NoData or %CEP_customData_tempget_pGUISettingSorting_{player}% != NoData or %CEP_customData_tempget_pGUICopyPlayerInfo_{player}% != NoData or %CEP_customData_tempget_pGUIFindPlayer_{player}% != NoData or %CEP_customData_tempget_pGUIChoosePage_{player}% != NoData' # Perform actions if we are still in "menu environment" even if closed the menu actions: default: - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;%math_0:DOWN_max(0,{CEP_customData_tempget_pGUIListCurAmount_{player}}-{changeoutput_equals_input:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20*floor({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)}_matcher:0_ifmatch:20_else:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20*floor({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)}})%;%math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-1%;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Show players again justReset: - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable # ===== ACTIONS WHEN CLICKING THE INVENTORY ===== # playersListGuiClick: type: player_click_inventory conditions: - '%inventory_type% != PLAYER and %CEP_customData_tempget_pGUI_{player}% == true' # The clicks should be not in player's inventory, but in opened menu and current opened menu variable state should be true - '%CEP_customData_tempget_pGUIShowRealInfoProcess_{player}% == true or %CEP_customData_tempget_pGUIFindPlayerProcess_{player}% == true execute errorSound' # Do not allow any clicking while showing the real players info or finding players (especially on the remained heads in case of showing real info) # Settings buttons - '%slot% == 26 and %click_type% == LEFT execute saveSettings' - '%slot% == 35 and %click_type% == LEFT and %CEP_customData_tempget_pGUIResetConfirm_{player}% == true execute resetSettings' - '%slot% == 35 and %click_type% == LEFT execute preResetSettings' - '%slot% == 35 and %click_type% == RIGHT execute resetSettingsCancel' # Show list or show errors - '%slot% == 37 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListCanBeLoadedAgain_{player}% == NoData execute errorSound' # Error sound if currently there are some active list loadings (not using %CEP_list_ASYNC:pGUI...% placeholder here due to its possible bugs if clicking fast on the show players button, we need some variable which will change its value after some time after list loading) - '%slot% == 37 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListCanBeLoadedAgain_{player}% != NoData and %CEP_customData_tempget_pGUIListOutput_{player}% == NoData execute preShowError' # Continue if currently there are none other list loadings, but show the error (in playersListGuiClickPreShow event) (not using %CEP_list_ASYNC:pGUI...% placeholder here due to its possible bugs if clicking fast on the show players button, we need some variable which will change its value after some time after list loading) - '%slot% == 37 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListCanBeLoadedAgain_{player}% != NoData execute preShow' # Continue successfully if currently there are none other list loadings (not using %CEP_list_ASYNC:pGUI...% placeholder here due to its possible bugs if clicking fast on the show players button, we need some variable which will change its value after some time after list loading) # Pages buttons - '%slot% == 53 and %click_type% == LEFT and %item% == ARROW execute nextPage' - '%slot% == 47 and %click_type% == LEFT and %item% == ARROW execute prevPage' - '%slot% == 8 and %click_type% == LEFT and %item% == SPECTRAL_ARROW execute lastPage' - '%slot% == 2 and %click_type% == LEFT and %item% == SPECTRAL_ARROW execute firstPage' # Type button - '%slot% == 10 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListType_{player}% == ONLINE execute changeType{%t%=OFFLINE;%l%=§8§l\| §7ONLINE §8» §aOFFLINE §8» §7ALL}' - '%slot% == 10 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListType_{player}% == OFFLINE execute changeType{%t%=ALL;%l%=§8§l\| §7ONLINE §8» §7OFFLINE §8» §aALL}' - '%slot% == 10 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListType_{player}% == ALL execute changeType{%t%=ONLINE;%l%=§8§l\| §aONLINE §8» §7OFFLINE §8» §7ALL}' # Limit button - '%slot% == 20 and ;RIGHT;SHIFT_RIGHT; contains ;%click_type%; and %CEP_customData_tempget_pGUIListLimit_{player}% == 1 execute errorSound' - '%slot% == 20 and %click_type% == LEFT execute changeLimit{%l%=+1}' - '%slot% == 20 and %click_type% == SHIFT_LEFT execute changeLimit{%l%=+10}' - '%slot% == 20 and %click_type% == RIGHT execute changeLimit{%l%=-1}' - '%slot% == 20 and %click_type% == SHIFT_RIGHT execute changeLimit{%l%=-10}' - '%slot% == 20 and %click_type% == MIDDLE and %CEP_customData_tempget_pGUIListLimit_{player}% == -1 execute changeLimit{%l%=1}' - '%slot% == 20 and %click_type% == MIDDLE execute changeLimit{%l%=min}' # Sorting button - '%slot% == 18 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListSorting_{player}% == NONE execute changeSorting{%s%=AZ;%l%=§8§l\| §7NONE §8» §aAZ §8» §7ZA §8» §7PLACEHOLDER}' - '%slot% == 18 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListSorting_{player}% == AZ execute changeSorting{%s%=ZA;%l%=§8§l\| §7NONE §8» §7AZ §8» §aZA §8» §7PLACEHOLDER}' - '%slot% == 18 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListSorting_{player}% == ZA execute changeSorting{%s%=SORT:$playerᵕonline@ yes,no;%l%=§8§l\| §7NONE §8» §7AZ §8» §7ZA §8» §aPLACEHOLDER}' - '%slot% == 18 and %click_type% == LEFT and %CEP_customData_tempget_pGUIListSorting_{player}% startsWith SORT: execute changeSorting{%s%=NONE;%l%=§8§l\| §aNONE §8» §7AZ §8» §7ZA §8» §7PLACEHOLDER}' - '%slot% == 18 and %click_type% == MIDDLE and %CEP_customData_tempget_pGUIListSorting_{player}% startsWith SORT: execute setSorting' # Conditions button - '%slot% == 27 and ;RIGHT;DROP; contains ;%click_type%; and %CEP_customData_tempget_pGUIListConditions_{player}% == NoData execute errorSound' - '%slot% == 27 and %click_type% == LEFT execute addConditions' - '%slot% == 27 and %click_type% == RIGHT execute removeConditions{%p1%=%CEP_customData_tempget_pGUIListConditionsPointer_{player}%;%p2%=%math_0:DOWN_max({CEP_customData_tempget_pGUIListConditionsPointer_{player}}-1,0)%}' # Remove chosen condition - '%slot% == 27 and %click_type% == MIDDLE and %CEP_array_|_GL_{CEP_customData_tempget_pGUIListConditions_{player}}% > 1 and %CEP_customData_tempget_pGUIListConditionsPointer_{player}% >= %math_0:DOWN_{CEP_array_|_GL_{CEP_customData_tempget_pGUIListConditions_{player}}}-1% execute chooseConditions{%p%=%CEP_customData_tempset_pGUIListConditionsPointer_0_{player}%}' - '%slot% == 27 and %click_type% == MIDDLE and %CEP_array_|_GL_{CEP_customData_tempget_pGUIListConditions_{player}}% > 1 execute chooseConditions{%p%=%CEP_customData_tempincrease_pGUIListConditionsPointer_1_{player}%}' - '%slot% == 27 and %click_type% == DROP execute changeConditions{%p%=%CEP_customData_tempget_pGUIListConditionsPointer_{player}%}' # Output button - '%slot% == 29 and ;RIGHT;DROP; contains ;%click_type%; and %CEP_customData_tempget_pGUIListOutput_{player}% == NoData execute errorSound' - '%slot% == 29 and %click_type% == LEFT execute addOutput' - '%slot% == 29 and %click_type% == RIGHT execute removeOutput{%p1%=%CEP_customData_tempget_pGUIListOutputPointer_{player}%;%p2%=%math_0:DOWN_max({CEP_customData_tempget_pGUIListOutputPointer_{player}}-1,0)%}' - '%slot% == 29 and %click_type% == MIDDLE and %CEP_array_|_GL_{CEP_customData_tempget_pGUIListOutput_{player}}% > 1 and %CEP_customData_tempget_pGUIListOutputPointer_{player}% >= %math_0:DOWN_{CEP_array_|_GL_{CEP_customData_tempget_pGUIListOutput_{player}}}-1% execute chooseOutput{%p%=%CEP_customData_tempset_pGUIListOutputPointer_0_{player}%}' - '%slot% == 29 and %click_type% == MIDDLE and %CEP_array_|_GL_{CEP_customData_tempget_pGUIListOutput_{player}}% > 1 execute chooseOutput{%p%=%CEP_customData_tempincrease_pGUIListOutputPointer_1_{player}%}' - '%slot% == 29 and %click_type% == DROP execute changeOutput{%p%=%CEP_customData_tempget_pGUIListOutputPointer_{player}%}' # Copy player info by clicking on the player's head - ';12;13;14;15;16;21;22;23;24;25;30;31;32;33;34;39;40;41;42;43; contains ;%slot%; and %click_type% == LEFT and ;PLAYER_HEAD;SKELETON_SKULL; contains ;%item%; execute copyPlayerInfo' # Show real info button - '%slot% == 17 and %click_type% == LEFT and %item% == ENDER_EYE execute showRealInfo' # Find player button - '%slot% == 44 and %click_type% == LEFT and %item% == SPYGLASS execute findPlayer' # Choose page buttons - ';3;4;6;7;48;49;51;52; contains ;%slot%; and %click_type% == LEFT and %item% == PAPER execute choosePage' actions: default: - 'cancel_event: true' # Just cancel the event if player clicked on the item without any functionality (and do the same everywhere below but already with functionality) errorSound: - 'cancel_event: true' - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;1.0' # Error sound showRealInfo: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIShowRealInfoProcess_true_{player}%' # Set variable which defines that we are currently in the showing real info process (for example, to not allow any clicks in menu, especially on the remained heads) - 'change_item: action:reset;target:%player%;slot:OPENED|17;name:0;lore:0' # Clear the real info item because we already used it (it will be shown again on the page switching) - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|17' # Clear the real info item because we already used it (it will be shown again on the page switching) - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to return it back further - 'change_item: action:reset;target:%player%;slot:OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|10,OPENED|18,OPENED|20,OPENED|26,OPENED|27,OPENED|29,OPENED|35,OPENED|37,OPENED|44,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53;name:0;lore:0' # Get rid of all items in menu to prohibit using them - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|10,OPENED|18,OPENED|20,OPENED|26,OPENED|27,OPENED|29,OPENED|35,OPENED|37,OPENED|44,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53' # Get rid of all items in menu to prohibit using them - 'manage_cycle: ASYNC@1;run;playersListGuiClickSaveRealInfo;0;last;1;,;12,13,14,15,16,21,22,23,24,25,30,31,32,33,34,39,40,41,42,43;playersListGuiClickSaveRealInfo;%player%' # Run cycle through all current showing players - 'manage_cycle: ASYNC@3;run;playersListGuiClickLoadingAnimation;0;last;1;,;47,38,29,20,11,2,3,4,5,6,7,8,17,26,35,44,53,52,51,50,49,48;playersListGuiClickLoadingAnimation;%player%' # Run a loading "animation" - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound choosePage: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIChoosePage_true_{player}%' # Set variable which defines that we are currently in the choosing page process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to be able to open it back if not specifying any page - 'close_inventory' - 'message: &r' - 'message: &fWrite &a<he page &fto the chat &7(with slash)&f.' - 'message: &fIt should be just a &a&lnumber&f.' - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"RETURN\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"BACK ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"TO MENU","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Return to the menu text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound findPlayer: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIFindPlayer_true_{player}%' # Set variable which defines that we are currently in the finding player process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu without heads to either open it back and load heads on the menu open if return to the menu and not specifying any players OR open it at the end when players will be found - 'change_item: action:reset;target:%player%;slot:OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|10,OPENED|17,OPENED|18,OPENED|20,OPENED|26,OPENED|27,OPENED|29,OPENED|35,OPENED|37,OPENED|44,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53;name:0;lore:0' # Get rid of all items in menu to prohibit using them - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|10,OPENED|17,OPENED|18,OPENED|20,OPENED|26,OPENED|27,OPENED|29,OPENED|35,OPENED|37,OPENED|44,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53' # Get rid of all items in menu to prohibit using them - 'manage_inventory: action:?save;inventory:PlayersListGUISavedEmpty%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu without all items to perform loading actions and animations - 'close_inventory' - 'message: &r' - 'message: &fWrite &6<he nicknames &fof the &6&lplayers' - 'message: &for &6<heir indeces &fin the list' - 'message: &fto the chat &7(with slash)&f.' - 'message: &7(Use "i:" for indeces)' - 'message: &r' - 'message: &fUp to &6&l5 entries&f!' - 'message: &7(Through comma)' - 'message: &r' - 'message: &cBe careful, the bigger list' - 'message: &cthe more time it requires to find!' - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"RETURN\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"BACK ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"TO MENU","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Return to the menu text - 'json_message: ["",{"text":" "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*RESET*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"RESET\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*RESET*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"THE ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*RESET*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"FINDING","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*RESET*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*RESET*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Reset the finding text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound copyPlayerInfo: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUICopyPlayerInfo_true_{player}%' # Set variable which defines that we are currently in the copying player info process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to be able to open it back after copying - 'message: &r' - 'message: &fLines below are &a&lclickable&f,' - 'message: &fthe appropriate &a&linfo &fwill be &a&lcopied&f:' - 'message: &r' - 'json_message: ["",{"text":"| ","bold":true,"color":"dark_gray"},{"text":"%CEP_item_name_|_OPENED|{slot}%","clickEvent":{"action":"copy_to_clipboard","value":"%CEP_replaceMulti_§=&_{CEP_item_name_|_OPENED|{slot}}%"},"hoverEvent":{"action":"show_text","contents":"%CEP_item_name_|_OPENED|{slot}%"}},{"text":" "},{"text":"%changeoutput_equals_input:{CEP_item_skullTexture_|_OPENED|{slot}}_matcher:None_ifmatch:§7(§fhead texture: §cNone§7)"_else:§7(§fhead texture: §acopy!§7)","clickEvent":{"action":"copy_to_clipboard","value":"{CEP_item_skullTexture_|_OPENED|{slot}}"},"hoverEvent":{"action":"show_text","contents":"§a{CEP_item_skullTexture_|_OPENED|{slot}}"}%}]' # Player's name starting text - 'manage_cycle: SYNC;run;playersListGuiClickCopyPlayerInfo;0;%math_0:DOWN_{CEP_item_loreAmount_,_OPENED|{slot}}-3%;1;|;%CEP_replaceMulti_ =`_{CEP_item_lore_|_OPENED|{slot}}%;playersListGuiClickCopyPlayerInfo;%player%' # Run cycle through the all necessary lore lines on clicked head to send them as text to the chat - 'close_inventory' - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"RETURN\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"BACK ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"TO MENU","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Return to the menu text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound chooseOutput: - 'cancel_event: true' - 'change_item: action:set;target:%player%;slot:OPENED|29;lore:||||§f%CEP_replaceMulti_\\$=$:\\@=@:|=|§f_{CEP_array_|_SBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}%' # Change lore of the output item (choose output) - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound removeOutput: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingOutput_remove_{player}%' # Set variable which defines that we are currently in the removing output process (yes this variable requires more things to do further to remove it etc, and seems we may better just not to use it because currently it is not being used anywhere as important thing, but this is done just for accordance for other settings variables style and behavior) - 'parse_placeholder: %CEP_customData_{changeoutput_equals_input:{CEP_array_|_GL_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_RBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p1}}}}_matcher:0_ifmatch:tempremove_pGUIListOutputTemp_{player}_else:tempset_pGUIListOutputTemp_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_RBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p1}}}_{player}}%' # Set temporary output variable (to check syntax further) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingOutputSyntaxCheck;%output%=%CEP_customData_tempget_pGUIListOutputTemp_{player}%;already_stored' # Check different output syntax (because after deleting some output the general output changes and may become incorrect, so we need to check it and prohibit on occasion) changeOutput: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingOutput_change_{player}%' # Set variable which defines that we are currently in the changing output process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to change chosen output - 'close_inventory' - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"AUTOSUGGEST","bold":true,"color":"light_purple","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":" THE ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"OUTPUT","bold":true,"color":"light_purple","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n TO YOUR ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"COMMAND LINE","bold":true,"color":"light_purple","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<:§=&_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Text with current chosen output to autosuggest it for changing - 'json_message: ["",{"text":" "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CANCEL\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"THE ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CHANGES","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Cancel the changes text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound addOutput: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingOutput_add_{player}%' # Set variable which defines that we are currently in the adding output process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to add new output - 'close_inventory' - 'message: &r' - 'message: &fWrite &d<he output &fto the chat &7(with slash)&f.' - 'json_message: ["",{"text":" "},{"text":"Hover","bold":true,"color":"light_purple","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §dcommon sense §fwhen making up the §doutput §f:)\n\n§d\u2192 §fAll placeholders, including nested, should be wrapped into §d$@§f;\n§d\u2192 §fUse §d\\\\$ §fand §d\\\\@ §finstead of §d$ §fand §d@ §fif you want to use $ or @ as part of the information and NOT placeholder;\n§d\u2192 §fUse §d\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§dclick §fon the message to copy this symbol);\n§d\u2192 §fLast output always should end with \"§d@§f\" symbol and none other symbol will NOT be suitable! You can use, for example, §d$empty@ §fplaceholder at the end to avoid this restriction and be able to write any symbols before it;\n§d\u2192 §fYou can NOT use odd number of backslashes (§d\\§f) nowhere;\n§d\u2192 §fYou can NOT use §d%§f, §d;§f, §d{§f, §d}§f and §d|§f symbols nowhere!"}},{"text":" here to see ","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §dcommon sense §fwhen making up the §doutput §f:)\n\n§d\u2192 §fAll placeholders, including nested, should be wrapped into §d$@§f;\n§d\u2192 §fUse §d\\\\$ §fand §d\\\\@ §finstead of §d$ §fand §d@ §fif you want to use $ or @ as part of the information and NOT placeholder;\n§d\u2192 §fUse §d\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§dclick §fon the message to copy this symbol);\n§d\u2192 §fLast output always should end with \"§d@§f\" symbol and none other symbol will NOT be suitable! You can use, for example, §d$empty@ §fplaceholder at the end to avoid this restriction and be able to write any symbols before it;\n§d\u2192 §fYou can NOT use odd number of backslashes (§d\\§f) nowhere;\n§d\u2192 §fYou can NOT use §d%§f, §d;§f, §d{§f, §d}§f and §d|§f symbols nowhere!"}},{"text":"rules","bold":true,"color":"light_purple","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §dcommon sense §fwhen making up the §doutput §f:)\n\n§d\u2192 §fAll placeholders, including nested, should be wrapped into §d$@§f;\n§d\u2192 §fUse §d\\\\$ §fand §d\\\\@ §finstead of §d$ §fand §d@ §fif you want to use $ or @ as part of the information and NOT placeholder;\n§d\u2192 §fUse §d\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§dclick §fon the message to copy this symbol);\n§d\u2192 §fLast output always should end with \"§d@§f\" symbol and none other symbol will NOT be suitable! You can use, for example, §d$empty@ §fplaceholder at the end to avoid this restriction and be able to write any symbols before it;\n§d\u2192 §fYou can NOT use odd number of backslashes (§d\\§f) nowhere;\n§d\u2192 §fYou can NOT use §d%§f, §d;§f, §d{§f, §d}§f and §d|§f symbols nowhere!"}},{"text":"...","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §dcommon sense §fwhen making up the §doutput §f:)\n\n§d\u2192 §fAll placeholders, including nested, should be wrapped into §d$@§f;\n§d\u2192 §fUse §d\\\\$ §fand §d\\\\@ §finstead of §d$ §fand §d@ §fif you want to use $ or @ as part of the information and NOT placeholder;\n§d\u2192 §fUse §d\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§dclick §fon the message to copy this symbol);\n§d\u2192 §fLast output always should end with \"§d@§f\" symbol and none other symbol will NOT be suitable! You can use, for example, §d$empty@ §fplaceholder at the end to avoid this restriction and be able to write any symbols before it;\n§d\u2192 §fYou can NOT use odd number of backslashes (§d\\§f) nowhere;\n§d\u2192 §fYou can NOT use §d%§f, §d;§f, §d{§f, §d}§f and §d|§f symbols nowhere!"}}]' # Text with all rules for output adding - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CANCEL\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"THE ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CHANGES","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Cancel the changes text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound chooseConditions: - 'cancel_event: true' - 'change_item: action:set;target:%player%;slot:OPENED|27;lore:||||%CEP_replaceMulti_>=\\>:<=\\<:(=§c§l(§f:)=§c§l)§f:| OR =|OR :| AND =|AND :|§a→ §f OR =|→OR :|§a→ §f AND =|→AND :|§a→ §fOR =|→OR :|§a→ §fAND =|→AND : AND =|§6§lAND §f: OR =|§e§lOR §f:|→OR =|§a→ §e§lOR §f:|→AND =|§a→ §6§lAND §f:|AND =|§6§lAND §f:|OR =|§e§lOR §f:~OR = §e§lOR §f:~AND = §6§lAND §f:|=|§f_§f{CEP_replaceRegEx_>=|<=|==|!=|>|<|!?(?:equalsIgnoreCase|equals|startsWith|contains|endsWith|matches)_§7$&§f_{CEP_replaceRegEx_\|§a→ §f(\s+)(AND|OR)\s+_|§a→ §f$1~$2 _{CEP_replaceRegEx_\|(\s+)(AND|OR)\s+_|$1~$2 _{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\\\\\>:<=\\\\\\<:␠= _{CEP_array_|_SBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}}}}%' # Replace current lore of the conditions item, using different replacements and fixes when start of the condition is " OR " or " AND ", to not move first entry to the new line, only all next entries - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound removeConditions: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingConditions_remove_{player}%' # Set variable which defines that we are currently in the removing condition process (the same as output, yes this variable requires more things to do further to remove it etc, and seems we may better just not to use it because currently it is not being used anywhere as important thing, but this is done just for accordance for other settings variables style and behavior) - 'parse_placeholder: %CEP_customData_{changeoutput_equals_input:{CEP_array_|_GL_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_RBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p1}}}}_matcher:0_ifmatch:tempremove_pGUIListConditionsTemp_{player}_else:tempset_pGUIListConditionsTemp_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_replaceRegEx_\|(\s+)(AND|OR)\s+_|$1~$2 _{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\\\>:<=\\\\<:␠= _{CEP_array_|_RBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p1}}}}}_{player}}%' # Set temporary conditions variable (to check syntax further) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingConditionsSyntaxCheck;%condition%=%CEP_customData_tempget_pGUIListConditionsTemp_{player}%;already_stored' # Check different condition syntax (because after deleting some condition the general condition changes and may become incorrect, so we need to check it and prohibit on occasion) addConditions: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingConditions_add_{player}%' # Set variable which defines that we are currently in the adding condition process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to add new conditions - 'close_inventory' - 'message: &r' - 'message: &fWrite &b<he condition &fto the chat &7(with slash)&f.' - 'json_message: ["",{"text":" "},{"text":"Hover","bold":true,"color":"aqua","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §bcommon sense §fwhen making up the §bconditions §f:)\n\n§b\u2192 §fAll conditions are one-lined! Just due to minecraft impossibility to write long text in one line, you can NOT write all at once in one line, so you can do it many times you want, at the end all conditions will be merged to one line, so pay attention to the spaces!;\n§b\u2192 §fAll placeholders, including nested, should be wrapped into §b$@§f;\n§b\u2192 §fUse §b\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§bclick §fon the message to copy this symbol);\n§b\u2192 §fYou CAN use §e§lOR §fand §6§lAND §ftogether, but NOT nearby;\n§b\u2192 §fThe GENERAL condition should NOT start or end with §e§lOR §for §6§lAND§f;\n§b\u2192 §fNone condition should NOT end with backslash (§b\\§f);\n§b\u2192 §fYou can NOT use odd number of backslashes (§b\\§f) nowhere;\n§b\u2192 §fYou can NOT use §b%§f, §b;§f, §b{§f, §b}§f and §b|§f symbols nowhere!"}},{"text":" here to see ","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §bcommon sense §fwhen making up the §bconditions §f:)\n\n§b\u2192 §fAll conditions are one-lined! Just due to minecraft impossibility to write long text in one line, you can NOT write all at once in one line, so you can do it many times you want, at the end all conditions will be merged to one line, so pay attention to the spaces!;\n§b\u2192 §fAll placeholders, including nested, should be wrapped into §b$@§f;\n§b\u2192 §fUse §b\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§bclick §fon the message to copy this symbol);\n§b\u2192 §fYou CAN use §e§lOR §fand §6§lAND §ftogether, but NOT nearby;\n§b\u2192 §fThe GENERAL condition should NOT start or end with §e§lOR §for §6§lAND§f;\n§b\u2192 §fNone condition should NOT end with backslash (§b\\§f);\n§b\u2192 §fYou can NOT use odd number of backslashes (§b\\§f) nowhere;\n§b\u2192 §fYou can NOT use §b%§f, §b;§f, §b{§f, §b}§f and §b|§f symbols nowhere!"}},{"text":"rules","bold":true,"color":"aqua","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §bcommon sense §fwhen making up the §bconditions §f:)\n\n§b\u2192 §fAll conditions are one-lined! Just due to minecraft impossibility to write long text in one line, you can NOT write all at once in one line, so you can do it many times you want, at the end all conditions will be merged to one line, so pay attention to the spaces!;\n§b\u2192 §fAll placeholders, including nested, should be wrapped into §b$@§f;\n§b\u2192 §fUse §b\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§bclick §fon the message to copy this symbol);\n§b\u2192 §fYou CAN use §e§lOR §fand §6§lAND §ftogether, but NOT nearby;\n§b\u2192 §fThe GENERAL condition should NOT start or end with §e§lOR §for §6§lAND§f;\n§b\u2192 §fNone condition should NOT end with backslash (§b\\§f);\n§b\u2192 §fYou can NOT use odd number of backslashes (§b\\§f) nowhere;\n§b\u2192 §fYou can NOT use §b%§f, §b;§f, §b{§f, §b}§f and §b|§f symbols nowhere!"}},{"text":"...","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §bcommon sense §fwhen making up the §bconditions §f:)\n\n§b\u2192 §fAll conditions are one-lined! Just due to minecraft impossibility to write long text in one line, you can NOT write all at once in one line, so you can do it many times you want, at the end all conditions will be merged to one line, so pay attention to the spaces!;\n§b\u2192 §fAll placeholders, including nested, should be wrapped into §b$@§f;\n§b\u2192 §fUse §b\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§bclick §fon the message to copy this symbol);\n§b\u2192 §fYou CAN use §e§lOR §fand §6§lAND §ftogether, but NOT nearby;\n§b\u2192 §fThe GENERAL condition should NOT start or end with §e§lOR §for §6§lAND§f;\n§b\u2192 §fNone condition should NOT end with backslash (§b\\§f);\n§b\u2192 §fYou can NOT use odd number of backslashes (§b\\§f) nowhere;\n§b\u2192 §fYou can NOT use §b%§f, §b;§f, §b{§f, §b}§f and §b|§f symbols nowhere!"}}]' # Text with all rules for condition adding - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CANCEL\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"THE ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CHANGES","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Cancel the changes text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound changeConditions: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingConditions_change_{player}%' # Set variable which defines that we are currently in the changing condition process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to change chosen conditions - 'close_inventory' - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"AUTOSUGGEST","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":" THE ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CONDITION","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n TO YOUR ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"COMMAND LINE","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Text with current chosen condition to autosuggest it for changing - 'json_message: ["",{"text":" "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CANCEL\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"THE ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CHANGES","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Cancel the changes text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound saveSettings: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISave_true_{player}%' # Set variable which defines that the settings saving is enabled - 'manage_inventory: action:save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Instantly save menu too - 'change_item: action:set;target:%player%;slot:OPENED|26;lore:§7Click to enable the current settings saving!||§8§l\| §fAll settings will be §2saved §feach time|§8§l\| §fyou §2close §fthis menu.||§8§l\| §2Left-Click §7to enable §7(§aenabled§7)' # Change the lore of the save item to set "enabled" mark - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound preResetSettings: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIResetConfirm_true_{player}%' # Set variable which defines that we are currently in the saving resetting state - 'change_item: action:set;target:%player%;slot:OPENED|35;lore:§7Click to reset the current settings!||§8§l\| §fAll settings will be §creset §fright now,|§8§l\| §fas well as §csaving §fdisabled.|§8§l\| §fDo not worry, there is a §cdouble confirmation §f:)||§8§l\| §2Left-Click §7to reset' # Set the lore of the reset settings item (default lore) - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound - 'wait: 2' # Wait to cancel resetting if user do nothing - 'execute_action_group: resetSettingsCancel:100' # Cancel resetting resetSettings: - 'cancel_event: true' - 'manage_cycle: SYNC;break;playersListGuiClickShow' # Stop loading current page - 'parse_placeholder: %CEP_customData_tempremove_pGUISave_{player}%' # Remove "menu saving" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIResetConfirm_{player}%' # Remove "resetting state" variable - 'change_item: action:set;target:%player%;slot:OPENED|26;lore:§7Click to enable the current settings saving!||§8§l\| §fAll settings will be §2saved §feach time|§8§l\| §fyou §2close §fthis menu.||§8§l\| §2Left-Click §7to enable §7(§cdisabled§7)' # Change the lore of the save settings item to set "disabled" mark - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound - 'player_send_chat: /pgui' # Just reopen the menu in the same way if the player would close the menu and then write /pgui (all necessary cleaning and setting will be performed in the playersListGuiOpenCommand event) resetSettingsCancel: - 'cancel_event: true' - 'console_command: ce interrupt playersListGuiClick %player% silent:true' # If cancel resetting settings, interrupt preResetSettings wait (not doing the same in the resetSettings above because as was said all necessary cleaning and setting the /pgui command does there) - 'parse_placeholder: %CEP_customData_tempremove_pGUIResetConfirm_{player}%' # Remove "resetting state" variable - 'change_item: action:reset;target:%player%;slot:OPENED|35;lore:0' # Reset the lore of the reset settings item to set the default lore below (without resetting the confirmation lines will interfere) - 'change_item: action:set;target:%player%;slot:OPENED|35;lore:§7Click to reset the current settings!||§8§l\| §fAll settings will be §creset §fright now.|§8§l\| §fDo not worry, there is a §cdouble confirmation §f:)||§8§l\| §2Left-Click §7to reset' # Set the lore of the reset settings item (default lore) - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;1.0' # Success sound preShowError: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCurSlot_{player}%' # Remove "current slot in players showing" variable to not show players again if we previously loaded some list, then started to load another list and click to some setting button, in that case we need to perform playersListGuiClickDifferentShowOneTime's event wait actions and not show the players - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to allow showing again the list of players in playersListGuiOpen event - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=load' # Launch one time waiting task - 'call_event: playersListGuiClickPreShow' # Launch waiting task preShow: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCurSlot_{player}%' # Remove "current slot in players showing" variable to not show players again if we previously loaded some list, then started to load another list and click to some setting button, in that case we need to perform playersListGuiClickDifferentShowOneTime's event wait actions and not show the players - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}{changeoutput_equals_input:{CEP_customData_tempget_pGUIListLimit_{player}}_matcher:-1_ifmatch:_else:_{CEP_customData_tempget_pGUIListLimit_{player}}}_,_{CEP_customData_tempget_pGUIListType_{player}}_{CEP_customData_tempget_pGUIListSorting_{player}}_$player_name@=$player_uuid@=$player_online@={CEP_customData_tempget_pGUIListOutput_{player}}{changeoutput_equals_input:{CEP_customData_tempget_pGUIListConditions_{player}}_matcher:NoData_ifmatch:_else:_{CEP_replaceMulti_>=\\>:<=\\<:|=_{CEP_customData_tempget_pGUIListConditions_{player}}}}%' # Get and save the list of players with current values asynchronously - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=load' # Launch one time waiting task - 'call_event: playersListGuiClickPreShow' # Launch waiting task - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound changeType: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIListType_{t}_{player}%' # Change variable which defines the current type - 'change_item: action:set;target:%player%;slot:OPENED|10;lore:§7Choose list type easily!||%l%||§8§l\| §2Left-Click §7to change' # Change the lore of the type item - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound changeLimit: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIListLimit_{changeoutput_equals_input:{l}_matcher:min_ifmatch:-1_else:{math_0:DOWN_max(1,{CEP_customData_tempget_pGUIListLimit_{player}}{changeoutput_equals_input:{l}_matcher:min_ifmatch:-1_else:{l}})}}_{player}%' # Change variable which defines the current limit - 'change_item: action:set;target:%player%;slot:OPENED|20;lore:§7Set limit of players in list!||§8§l\| §fNow §7» §a%changeoutput_equals_input:{CEP_customData_tempget_pGUIListLimit_{player}}_matcher:-1_ifmatch:ALL PLAYERS_else:{CEP_customData_tempget_pGUIListLimit_{player}}%||§8§l\| §2Left-Click §7» §f+1 §7(§cRight-Click §7» §f-1§7)|§8§l\| §2Shift + Left-Click §7» §f+10 §7(§cShift + Right-Click §7» §f-10§7)|§8§l\| §eMouse-Click §7» §fALL PLAYERS §7(again §8→ §71 player)' # Change the lore of the limit item - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound changeSorting: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUIListSorting_{s}_{player}%' # Change variable which defines the current sorting - 'change_item: action:reset;target:%player%;slot:OPENED|18;lore:0' # Reset the lore of the sorting item to set the new lore below (without resetting when changing to and from PLACEHOLDER type the extra/missing lines will interfere) - 'change_item: action:set;target:%player%;slot:OPENED|18;lore:§7Choose how you want to display players!||%l%%changeoutput_equals_input:{string_startsWith_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}_SORT:}_matcher:true_ifmatch:|{CEP_repeat_ _25}§8§l\| §f{CEP_replaceMulti_>=\\>:<=\\<: DESC= §cDESC: =|{CEP_repeat_ _25}§8§l\| §3:SORT\:=SORT\:|{CEP_repeat_ _25}§8§l\| §b_{CEP_customData_tempget_pGUIListSorting_{player}}}_else:%||§8§l\| §2Left-Click §7to change%changeoutput_equals_input:{string_startsWith_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}_SORT:}_matcher:true_ifmatch:|§8§l\| §eMouse-Click §7to set_else:%' # Change lore of the sorting item in menu (switch to new sorting type) - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound setSorting: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempset_pGUISettingSorting_set_{player}%' # Set variable which defines that we are currently in the setting sorting process - 'manage_inventory: action:?save;inventory:PlayersListGUISaved%player%;owner:^%player%;title:PLAYERS LISTS UTILITY' # Save current menu to set new sorting - 'close_inventory' - 'message: &r' - 'message: &fWrite &3<he sorting &fto the chat &7(with slash)&f.' - 'json_message: ["",{"text":" "},{"text":"Hover","bold":true,"color":"dark_aqua","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §3common sense §fwhen making up the §3sorting §f:)\n\n§3\u2192 §fSorting should have this format: §3SORT:$number_or_text_placeholder@ (optional)value1,value2,valueN (optional)DESC§f;\n§3\u2192 §fYou can sort either by §3number placeholder §f(ascending or descending in case of DESC) or by §3text placeholder §fby specifying the values list (DESC is also supported), but number placeholders also be able to have values list;\n§3\u2192 §fUse §3\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§3click §fon the message to copy this symbol);\n§3\u2192 §fSorting should NOT end with backslash (§3\\§f);\n§3\u2192 §fYou can NOT use odd number of backslashes (§3\\§f) nowhere;\n§3\u2192 §fYou can NOT use §3%§f, §3;§f, §3{§f, §3}§f and §3|§f symbols nowhere!"}},{"text":" here to see ","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §3common sense §fwhen making up the §3sorting §f:)\n\n§3\u2192 §fSorting should have this format: §3SORT:$number_or_text_placeholder@ (optional)value1,value2,valueN (optional)DESC§f;\n§3\u2192 §fYou can sort either by §3number placeholder §f(ascending or descending in case of DESC) or by §3text placeholder §fby specifying the values list (DESC is also supported), but number placeholders also be able to have values list;\n§3\u2192 §fUse §3\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§3click §fon the message to copy this symbol);\n§3\u2192 §fSorting should NOT end with backslash (§3\\§f);\n§3\u2192 §fYou can NOT use odd number of backslashes (§3\\§f) nowhere;\n§3\u2192 §fYou can NOT use §3%§f, §3;§f, §3{§f, §3}§f and §3|§f symbols nowhere!"}},{"text":"rules","bold":true,"color":"dark_aqua","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §3common sense §fwhen making up the §3sorting §f:)\n\n§3\u2192 §fSorting should have this format: §3SORT:$number_or_text_placeholder@ (optional)value1,value2,valueN (optional)DESC§f;\n§3\u2192 §fYou can sort either by §3number placeholder §f(ascending or descending in case of DESC) or by §3text placeholder §fby specifying the values list (DESC is also supported), but number placeholders also be able to have values list;\n§3\u2192 §fUse §3\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§3click §fon the message to copy this symbol);\n§3\u2192 §fSorting should NOT end with backslash (§3\\§f);\n§3\u2192 §fYou can NOT use odd number of backslashes (§3\\§f) nowhere;\n§3\u2192 §fYou can NOT use §3%§f, §3;§f, §3{§f, §3}§f and §3|§f symbols nowhere!"}},{"text":"...","clickEvent":{"action":"copy_to_clipboard","value":"\u2420"},"hoverEvent":{"action":"show_text","contents":"§fUse §3common sense §fwhen making up the §3sorting §f:)\n\n§3\u2192 §fSorting should have this format: §3SORT:$number_or_text_placeholder@ (optional)value1,value2,valueN (optional)DESC§f;\n§3\u2192 §fYou can sort either by §3number placeholder §f(ascending or descending in case of DESC) or by §3text placeholder §fby specifying the values list (DESC is also supported), but number placeholders also be able to have values list;\n§3\u2192 §fUse §3\u2420 §fsymbol instead of spaces where amount of spaces nearby are above 1 (§3click §fon the message to copy this symbol);\n§3\u2192 §fSorting should NOT end with backslash (§3\\§f);\n§3\u2192 §fYou can NOT use odd number of backslashes (§3\\§f) nowhere;\n§3\u2192 §fYou can NOT use §3%§f, §3;§f, §3{§f, §3}§f and §3|§f symbols nowhere!"}}]' # Text with all rules for sorting adding - 'json_message: ["",{"text":"\n "},{"text":"[CLICK TO ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"AUTOSUGGEST","bold":true,"color":"dark_aqua","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":" THE ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"SORTING","bold":true,"color":"dark_aqua","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n TO YOUR ","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"COMMAND LINE","bold":true,"color":"dark_aqua","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"suggest_command","value":"/%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_ (?= )_␠_{CEP_replaceRegEx_\\\\(?!\\$|\\@)_\\\\_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}}}%"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Text with current sorting to autosuggest it for changing - 'json_message: ["",{"text":" "},{"text":"[CLICK TO ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CANCEL\n ","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"THE ","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"CHANGES","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"]","clickEvent":{"action":"run_command","value":"/*CANCEL*"},"hoverEvent":{"action":"show_text","contents":"Click!"}},{"text":"\n "}]' # Cancel the changes text - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound nextPage: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to allow showing again the list of players in playersListGuiOpen event - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|47;name:§7(§a%math_0:UP_{CEP_customData_tempget_pGUIListCurAmount_{player}}/20%§7) §a← §fPrevious page' # Update previous page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|2;name:§7(§e1§7) §e← §fFirst page' - 'manage_cycle: SYNC;break;playersListGuiClickShow' # Stop loading current page - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;%CEP_customData_tempget_pGUIListCurAmount_{player}%;%math_0:DOWN_min({CEP_customData_tempget_pGUIListCurAmount_{player}}+19,{CEP_customData_tempget_pGUICurListLength_{player}})%;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Start loading new page (SYNC@1 for smooth heads appearing) - 'parse_placeholder: %CEP_customData_tempset_pGUIListCurAmount_{math_0:DOWN_min({CEP_customData_tempget_pGUIListCurAmount_{player}}+20,{CEP_customData_tempget_pGUICurListLength_{player}})}_{player}%' # Change variable which defines current amount of showing players - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=updatePages' # Update choose page items - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|53;name:§fNext page §a→ §7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)+1%§7)' # Update next page item - 'execute_action_group: %changeoutput_>=_input:{CEP_customData_tempget_pGUIListCurAmount_{player}}_matcher:{CEP_customData_tempget_pGUICurListLength_{player}}_ifmatch:nextPageRemove_else:none%:100' # If there are none pages further, remove next page items - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound nextPageRemove: - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|8,OPENED|53' # Remove next page items - 'change_item: action:reset;target:%player%;slot:OPENED|8,OPENED|53;name:0;lore:0' # Remove next page items prevPage: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to allow showing again the list of players in playersListGuiOpen event - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|53;name:§fNext page §a→ §7(§a%math_0:UP_{CEP_customData_tempget_pGUIListCurAmount_{player}}/20%§7)' # Update next page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|8;name:§fLast page §e→ §7(§e%math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20%§7)' # Update last page item - 'parse_placeholder: %CEP_customData_tempdecrease_pGUIListCurAmount_{changeoutput_equals_input:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20*floor({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)}_matcher:0_ifmatch:20_else:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20*floor({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)}}_{player}%' # Formula to decrease current showing players amount by 20 OR by current amount of players on the page for example 13 or 4 etc - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=updatePages' # Update choose page items - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|47;name:§7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)-1%§7) §a← §fPrevious page' # Update previous page item - 'manage_cycle: SYNC;break;playersListGuiClickShow' # Stop loading current page - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;%math_0:DOWN_max(0,{CEP_customData_tempget_pGUIListCurAmount_{player}}-20)%;%math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-1%;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Start loading new page (SYNC@1 for smooth heads appearing) - 'execute_action_group: %changeoutput_<=_input:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20}_matcher:0_ifmatch:prevPageRemove_else:none%:100' # If there are none pages before, remove previous page items - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound prevPageRemove: - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|2,OPENED|47' # Remove previous page items - 'change_item: action:reset;target:%player%;slot:OPENED|2,OPENED|47;name:0;lore:0' # Remove previous page items lastPage: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to allow showing again the list of players in playersListGuiOpen event - 'manage_cycle: SYNC;break;playersListGuiClickShow' # Stop loading current page - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;%math_0:DOWN_{CEP_customData_tempget_pGUICurListLength_{player}}-{changeoutput_equals_input:{math_0:DOWN_{CEP_customData_tempget_pGUICurListLength_{player}}[prc]20}_matcher:0_ifmatch:20_else:{math_0:DOWN_{CEP_customData_tempget_pGUICurListLength_{player}}[prc]20}}%;last;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Start loading new page (SYNC@1 for smooth heads appearing) - 'parse_placeholder: %CEP_customData_tempset_pGUIListCurAmount_{CEP_customData_tempget_pGUICurListLength_{player}}_{player}%' # Change variable which defines current amount of showing players - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=updatePages' # Update choose page items - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|47;name:§7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)-1%§7) §a← §fPrevious page' # Update previous page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|2;name:§7(§e1§7) §e← §fFirst page' # Update first page item - 'execute_action_group: nextPageRemove:100' # Remove next page items - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound firstPage: - 'cancel_event: true' - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to allow showing again the list of players in playersListGuiOpen event - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to allow showing again the list of players in playersListGuiOpen event - 'manage_cycle: SYNC;break;playersListGuiClickShow' # Stop loading current page - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;0;19;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Start loading new page (SYNC@1 for smooth heads appearing) - 'parse_placeholder: %CEP_customData_tempset_pGUIListCurAmount_20_{player}%' # Change variable which defines current amount of showing players - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=updatePages' # Update choose page items - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|53;name:§fNext page §a→ §7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)+1%§7)' # Update next page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|8;name:§fLast page §e→ §7(§e%math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20%§7)' # Update last page item - 'execute_action_group: prevPageRemove:100' # Remove previous page items - 'playsound: UI_BUTTON_CLICK;10;2.0' # Action sound # ===== ACTIONS WHEN SETTING THE LIST CONDITIONS ===== # playersListGuiClickSettingConditions: type: player_command conditions: - '%CEP_customData_tempget_pGUISettingConditions_{player}% != NoData' # Allow execution only if current setting is a conditions setting - '%command% == /*CANCEL* execute cancel' # Cancel changes - '%command% matches .*[%{};|].* execute errors{%error%=&cCondition should not contain percents, semicolons, braces and vertical bars!}' # If condition contains prohibited symbols, throw appropriate error - '%CEP_customData_tempget_pGUISettingConditions_{player}% == change execute change' # Change chosen condition - '%CEP_customData_tempget_pGUISettingConditions_{player}% == add execute add' # Add new condition actions: errors: - 'cancel_event: true' # Player should not write it to the chat - 'message: &r' # Error message - 'message: %error%' # Error message - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;0.5' # Error sound cancel: - 'cancel_event: true' # Player should not write it to the chat - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUISettingConditions_{player}%' # Remove "setting conditions" variable when cancelling the changes - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=wait' # Change the main searching indicator item, which in general shows different items with information, but when the saved menu opens it can be any of these items, even just AIR if the player will start to setting something in the right timing, so we set this to the special item - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;1.0' # Cancel sound change: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditionsTemp_{CEP_replaceMulti_| AND =|AND :| OR =|OR :ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_replaceRegEx_\|(\s+)(AND|OR)\s+_|$1~$2 _{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\\\>:<=\\\\<:␠= _{CEP_array_|_SBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{string_substring_1_{command}}}}}}}_{player}%' # Set temporary conditions variable (to check syntax further) with fixes when start of the condition is " OR " or " AND ", to not move first entry to the new line, only all next entries (affects all conditions except the first one, where is none "|" delimiter at the start, in turn this will be checked as part of the syntax in the playersListGuiClickSettingConditionsSyntaxCheck event) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingConditionsSyntaxCheck;%condition%=%CEP_customData_tempget_pGUIListConditionsTemp_{player}%;already_stored' # Check different condition syntax add: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditionsTemp_{CEP_replaceMulti_| AND =|AND :| OR =|OR :ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_replaceRegEx_\|(\s+)(AND|OR)\s+_|$1~$2 _{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\\\>:<=\\\\<:␠= _{changeoutput_equals_input:{CEP_customData_tempget_pGUIListConditions_{player}}_matcher:NoData_ifmatch:{string_substring_1_{command}}_else:{CEP_array_|_ABI_{CEP_customData_tempget_pGUIListConditions_{player}}_{math_0:DOWN_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}+1}_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{string_substring_1_{command}}}}}}}}_{player}%' # Set temporary conditions variable (to check syntax further) with fixes when start of the condition is " OR " or " AND ", to not move first entry to the new line, only all next entries (affects all conditions except the first one, where is none "|" delimiter at the start, in turn this will be checked as part of the syntax in the playersListGuiClickSettingConditionsSyntaxCheck event) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingConditionsSyntaxCheck;%condition%=%CEP_customData_tempget_pGUIListConditionsTemp_{player}%;already_stored' # Check different condition syntax # ===== CHECK DIFFERENT CONDITION SYNTAX WHILE SETTING THE CONDITIONS ===== # playersListGuiClickSettingConditionsSyntaxCheck: type: call conditions: - '%condition% != NoData and %condition% matches ^(?: *(?:AND|OR) ).* execute invalidSyntax{%error%=&cCondition should not start with " AND " or " OR "!}' # If general condition starts with " AND " or " OR ", throw appropriate error - '%condition% != NoData and %condition% matches .*(?: (?:AND|OR) *)$ execute invalidSyntax{%error%=&cCondition should not end with " AND " or " OR "!}' # If general condition ends with " AND " or " OR ", throw appropriate error - '%condition% != NoData and %condition% matches .*(?: AND +OR | OR +AND ).* execute invalidSyntax{%error%=&cCondition should not contain " AND " and " OR " nearby without any expressions!}' # If condition contains " AND " and " OR " nearby without any expressions, throw appropriate error - '%condition% != NoData and %condition% endsWith \ execute invalidSyntax{%error%=&cCondition should not end with backslash ("\")!}' # If general condition ends with "\", throw appropriate error - '%string_substring_1_{command}% endsWith \ execute invalidSyntax{%error%=&cCondition should not end with backslash ("\")!}' # If current condition ends with "\", throw appropriate error - '%condition% != NoData and %CEP_replaceRegEx_\\_ܛ_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{condition}}% matches .*(?=\\>:<=\\<_{CEP_replaceRegEx_>=|<=|==|!=|>|<|!?(?:equalsIgnoreCase|equals|startsWith|contains|endsWith|matches)_§7$&§f_{CEP_replaceMulti_>=\\>:<=\\<:(=§c§l(§f:)=§c§l)§f:| OR =|OR :| AND =|AND :|§a→ §f OR =|→OR :|§a→ §f AND =|→AND :|§a→ §fOR =|→OR :|§a→ §fAND =|→AND : AND =|§6§lAND §f: OR =|§e§lOR §f:|→OR =|§a→ §e§lOR §f:|→AND =|§a→ §6§lAND §f:|AND =|§6§lAND §f:|OR =|§e§lOR §f:~OR = §e§lOR §f:~AND = §6§lAND §f:|=|§f_{CEP_array_|_SBI_{condition}_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{condition}_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}}}}}}%|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' # Change lore of the conditions item in menu (change chosen condition) - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditions_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<:␠= _{CEP_array_|_SBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{string_substring_1_{command}}}}}_{player}%' # Update variable which defines list conditions - 'parse_placeholder: %CEP_customData_tempremove_pGUIListConditionsTemp_{player}%' # Remove temporary conditions variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound add: - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'execute_action_group: removeVariable:100' # Remove "setting conditions" variable after setting the conditions - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=wait' # Change the main searching indicator item, which in general shows different items with information, but when the saved menu opens it can be any of these items, even just AIR if the player will start to setting something in the right timing, so we set this to the special item - 'change_item: action:reset;target:%player%;slot:OPENED|27;lore:0' # Reset lore of the conditions item - 'change_item: action:set;target:%player%;slot:OPENED|27;lore:§7Set any conditions you want for players!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§f%CEP_replaceMulti_>=\\>:<=\\<_{CEP_replaceRegEx_>=|<=|==|!=|>|<|!?(?:equalsIgnoreCase|equals|startsWith|contains|endsWith|matches)_§7$&§f_{CEP_replaceMulti_>=\\>:<=\\<:(=§c§l(§f:)=§c§l)§f:| OR =|OR :| AND =|AND :|§a→ §f OR =|→OR :|§a→ §f AND =|→AND :|§a→ §fOR =|→OR :|§a→ §fAND =|→AND : AND =|§6§lAND §f: OR =|§e§lOR §f:|→OR =|§a→ §e§lOR §f:|→AND =|§a→ §6§lAND §f:|AND =|§6§lAND §f:|OR =|§e§lOR §f:~OR = §e§lOR §f:~AND = §6§lAND §f:|=|§f_{CEP_array_|_SBI_{condition}_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{condition}_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}}}}}}%|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' # Change lore of the conditions item in menu (add new condition) - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditions_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<:␠= _{changeoutput_equals_input:{CEP_customData_tempget_pGUIListConditions_{player}}_matcher:NoData_ifmatch:{string_substring_1_{command}}_else:{CEP_array_|_ABI_{CEP_customData_tempget_pGUIListConditions_{player}}_{math_0:DOWN_{CEP_customData_tempget_pGUIListConditionsPointer_{player}}+1}_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{string_substring_1_{command}}}}}}_{player}%' # Update variable which defines list conditions - 'parse_placeholder: %CEP_customData_tempremove_pGUIListConditionsTemp_{player}%' # Remove temporary conditions variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound remove: - 'execute_action_group: removeVariable:100' # Remove "setting conditions" variable after setting the conditions - 'parse_placeholder: %CEP_customData_{changeoutput_equals_input:{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{condition}}_matcher:NoData_ifmatch:tempremove_pGUIListConditions_{player}_else:tempset_pGUIListConditions_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{condition}}_{player}}%' # Update variable which defines list conditions - 'change_item: action:reset;target:%player%;slot:OPENED|27;lore:0' # Reset lore of the conditions item - 'change_item: action:set;target:%player%;slot:OPENED|27;lore:§7Set any conditions you want for players!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§f%changeoutput_equals_input:{CEP_customData_tempget_pGUIListConditions_{player}}_matcher:NoData_ifmatch:§cEmpty_else:{CEP_replaceMulti_>=\\>:<=\\<:(=§c§l(§f:)=§c§l)§f:| OR =|OR :| AND =|AND :|§a→ §f OR =|→OR :|§a→ §f AND =|→AND :|§a→ §fOR =|→OR :|§a→ §fAND =|→AND : AND =|§6§lAND §f: OR =|§e§lOR §f:|→OR =|§a→ §e§lOR §f:|→AND =|§a→ §6§lAND §f:|AND =|§6§lAND §f:|OR =|§e§lOR §f:~OR = §e§lOR §f:~AND = §6§lAND §f:|=|§f_{CEP_replaceRegEx_\\>=|\\<=|==|!=|\\>|\\<|!?(?:equalsIgnoreCase|equals|startsWith|contains|endsWith|matches)_§7$&§f_{CEP_array_|_SBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p2}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\\\>:<=\\\\<_{CEP_array_|_GBI_{CEP_customData_tempget_pGUIListConditions_{player}}_{p2}}}}}}%|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' # Change lore of the conditions item in menu (remove chosen condition or show "Empty" if there are none list conditions) - 'parse_placeholder: %CEP_customData_tempset_pGUIListConditionsPointer_{p2}_{player}%' # Update the actual conditions pointer - 'parse_placeholder: %CEP_customData_tempremove_pGUIListConditionsTemp_{player}%' # Remove temporary conditions variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound # ===== ACTIONS WHEN SETTING THE LIST OUTPUT ===== # playersListGuiClickSettingOutput: type: player_command conditions: - '%CEP_customData_tempget_pGUISettingOutput_{player}% != NoData' # Allow execution only if current setting is a output setting - '%command% == /*CANCEL* execute cancel' # Cancel changes - '%command% matches .*[%{};|].* execute errors{%error%=&cOutput should not contain percents, semicolons, braces and vertical bars!}' # If output contains prohibited symbols, throw appropriate error - '%CEP_customData_tempget_pGUISettingOutput_{player}% == change execute change' # Change chosen output - '%CEP_customData_tempget_pGUISettingOutput_{player}% == add execute add' # Add new output actions: errors: - 'cancel_event: true' # Player should not write it to the chat - 'message: &r' # Error message - 'message: %error%' # Error message - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;0.5' # Error sound cancel: - 'cancel_event: true' # Player should not write it to the chat - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUISettingOutput_{player}%' # Remove "setting output" variable when cancelling the changes - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=wait' # Change the main searching indicator item, which in general shows different items with information, but when the saved menu opens it can be any of these items, even just AIR if the player will start to setting something in the right timing, so we set this to the special item - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;1.0' # Cancel sound change: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempset_pGUIListOutputTemp_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<:␠= :&=§_{CEP_array_|_SBI_{CEP_customData_tempget_pGUIListOutput_{player}}_{CEP_customData_tempget_pGUIListOutputPointer_{player}}_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{string_substring_1_{command}}}}}_{player}%' # Set temporary output variable (to check syntax further) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingOutputSyntaxCheck;%output%=%CEP_customData_tempget_pGUIListOutputTemp_{player}%;already_stored' # Check different output syntax add: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempset_pGUIListOutputTemp_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<:␠= :&=§_{changeoutput_equals_input:{CEP_customData_tempget_pGUIListOutput_{player}}_matcher:NoData_ifmatch:{string_substring_1_{command}}_else:{CEP_array_|_ABI_{CEP_customData_tempget_pGUIListOutput_{player}}_{math_0:DOWN_{CEP_customData_tempget_pGUIListOutputPointer_{player}}+1}_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{string_substring_1_{command}}}}}}_{player}%' # Set temporary output variable (to check syntax further) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingOutputSyntaxCheck;%output%=%CEP_customData_tempget_pGUIListOutputTemp_{player}%;already_stored' # Check different output syntax # ===== CHECK DIFFERERENT OUTPUT SYNTAX WHILE SETTING THE OUTPUT ===== # playersListGuiClickSettingOutputSyntaxCheck: type: call conditions: - '%output% != NoData and %output% !endsWith @ execute invalidSyntax{%error%=&cOutput should always end with "@" symbol! If you want to write any other symbols at the end, you can use, for example, &c&l$empty@ &cplaceholder and you will be able to write any symbols before it!}' # If general output does not end with "@", throw appropriate error - '%output% != NoData and %output% endsWith \ execute invalidSyntax{%error%=&cOutput should not end with backslash ("\")!}' # If general output ends with "\", throw appropriate error - '%string_substring_1_{command}% endsWith \ execute invalidSyntax{%error%=&cOutput should not end with backslash ("\")!}' # If current output ends with "\", throw appropriate error - '%output% != NoData and %CEP_replaceRegEx_\\_ܛ_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{output}}% matches .*(?=\\>:<=\\<_{output}}_{player}%' # Update variable which defines list output - 'change_item: action:reset;target:%player%;slot:OPENED|29;lore:0' # Reset lore of the output item - 'change_item: action:set;target:%player%;slot:OPENED|29;lore:§7Output necessary information easily!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§f%CEP_replaceMulti_>=\\>:<=\\<:\\$=$:\\@=@:|=|§f_{CEP_array_|_SBI_{output}_{CEP_customData_tempget_pGUIListOutputPointer_{player}}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{output}_{CEP_customData_tempget_pGUIListOutputPointer_{player}}}}}%|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' # Change lore of the output item in menu (change chosen output) - 'parse_placeholder: %CEP_customData_tempremove_pGUIListOutputTemp_{player}%' # Remove temporary output variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound add: - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'execute_action_group: removeVariable:100' # Remove "setting output" variable after setting the output - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=wait' # Change the main searching indicator item, which in general shows different items with information, but when the saved menu opens it can be any of these items, even just AIR if the player will start to setting something in the right timing, so we set this to the special item - 'parse_placeholder: %CEP_customData_tempset_pGUIListOutput_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{output}}_{player}%' # Update variable which defines list output - 'change_item: action:reset;target:%player%;slot:OPENED|29;lore:0' # Reset lore of the output item - 'change_item: action:set;target:%player%;slot:OPENED|29;lore:§7Output necessary information easily!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§f%CEP_replaceMulti_>=\\>:<=\\<:\\$=$:\\@=@:|=|§f_{CEP_array_|_SBI_{output}_{CEP_customData_tempget_pGUIListOutputPointer_{player}}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{output}_{CEP_customData_tempget_pGUIListOutputPointer_{player}}}}}%|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' # Change lore of the output item in menu (add new output) - 'parse_placeholder: %CEP_customData_tempremove_pGUIListOutputTemp_{player}%' # Remove temporary output variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound remove: - 'execute_action_group: removeVariable:100' # Remove "setting output" variable after setting the output - 'parse_placeholder: %CEP_customData_{changeoutput_equals_input:{output}_matcher:NoData_ifmatch:tempremove_pGUIListOutput_{player}_else:tempset_pGUIListOutput_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{output}}_{player}}%' # Update variable which defines list output - 'change_item: action:reset;target:%player%;slot:OPENED|29;lore:0' # Reset lore of the output item - 'change_item: action:set;target:%player%;slot:OPENED|29;lore:§7Output necessary information easily!||§8§l\| §fNow:|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§f%changeoutput_equals_input:{output}_matcher:NoData_ifmatch:§cEmpty_else:{CEP_replaceMulti_>=\\>:<=\\<:\\$=$:\\@=@:|=|§f_{CEP_array_|_SBI_{output}_{p2}_§a→ §f{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_array_|_GBI_{output}_{p2}}}}}%|§8§l━━━━━━━━━━━━━━━━━━━━━━━━━━|§8§l\| §2Left-Click §7to add|§8§l\| §eMouse-Click §7to choose|§8§l\| §6Q §7to change|§8§l\| §cRight-Click §7to delete' # Change lore of the output item in menu (remove chosen output) - 'parse_placeholder: %CEP_customData_tempset_pGUIListOutputPointer_{p2}_{player}%' # Update the actual output pointer - 'parse_placeholder: %CEP_customData_tempremove_pGUIListOutputTemp_{player}%' # Remove temporary output variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound # ===== ACTIONS WHEN SETTING THE LIST SORTING ===== # playersListGuiClickSettingSorting: type: player_command conditions: - '%CEP_customData_tempget_pGUISettingSorting_{player}% != NoData' # Allow execution only if current setting is a sorting setting - '%command% == /*CANCEL* execute cancel' # Cancel changes - '%command% matches .*[%{};|].* execute errors{%error%=&cSorting should not contain percents, semicolons, braces and vertical bars!}' # If sorting contains prohibited symbols, throw appropriate error - '%CEP_customData_tempget_pGUISettingSorting_{player}% == set execute set' # Set the sorting actions: errors: - 'cancel_event: true' # Player should not write it to the chat - 'message: &r' # Error message - 'message: %error%' # Error message - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;0.5' # Error sound cancel: - 'cancel_event: true' # Player should not write it to the chat - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUISettingSorting_{player}%' # Remove "setting sorting" variable when cancelling the changes - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=wait' # Change the main searching indicator item, which in general shows different items with information, but when the saved menu opens it can be any of these items, even just AIR if the player will start to setting something in the right timing, so we set this to the special item - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;1.0' # Cancel sound set: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempset_pGUIListSortingTemp_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<:␠= _{string_substring_1_{command}}}_{player}%' # Set temporary sorting variable (to check syntax further) (also maybe this variable will be useful somewhere in the future to get info outside of the call event below) - 'call_event: playersListGuiClickSettingSortingSyntaxCheck;%sort%=%CEP_customData_tempget_pGUIListSortingTemp_{player}%;already_stored' # Check different sorting syntax # ===== CHECK DIFFERENT SORTING SYNTAX WHILE SETTING THE SORTING ===== # playersListGuiClickSettingSortingSyntaxCheck: type: call conditions: - '%sort% != NoData and %sort% !matches ^SORT:\$.+@(?:$|\s+(?:DESC|[^\s,]+(?:\s*,\s*[^\s,]+)*(?:\s+DESC)?))$ execute invalidSyntax{%error%=&cSorting should be in this format: "SORT:$number_or_text_placeholder@ (optional)value1,value2,valueN (optional)DESC"}' # If sorting is not suitable to the correct format, throw appropriate error - '%sort% != NoData and %sort% endsWith \ execute invalidSyntax{%error%=&cSorting should not end with backslash ("\")!}' # If sorting ends with "\", throw appropriate error - '%sort% != NoData and %CEP_replaceRegEx_\\_ܛ_{CEP_replaceMulti_>=\\\\>:<=\\\\<_{sort}}% matches .*(?=\\>:<=\\<_{sort}}_{player}%' # Update variable which defines list sorting - 'change_item: action:reset;target:%player%;slot:OPENED|18;lore:0' # Reset lore of the output item - 'change_item: action:set;target:%player%;slot:OPENED|18;lore:§7Choose how you want to display players!||§8§l\| §7NONE §8» §7AZ §8» §7ZA §8» §aPLACEHOLDER|%CEP_repeat_ _25%§8§l\| §f%CEP_replaceMulti_>=\\>:<=\\<: DESC= §cDESC: =|{CEP_repeat_ _25}§8§l\| §3:SORT\:=SORT\:|{CEP_repeat_ _25}§8§l\| §b_{sort}%||§8§l\| §2Left-Click §7to change%changeoutput_equals_input:{string_startsWith_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<_{CEP_customData_tempget_pGUIListSorting_{player}}}_SORT:}_matcher:true_ifmatch:|§8§l\| §eMouse-Click §7to set_else:%' # Change lore of the sorting item in menu (set the sorting) - 'parse_placeholder: %CEP_customData_tempremove_pGUIListSortingTemp_{player}%' # Remove temporary sorting variable - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound # ===== ONE TIME ACTIONS (FOR EXAMPLE WHICH SHOULD BE PERFORMED ONLY ONCE WHILE CALL EVENT IS GOING TO CHECK THE LIST STATE, OR JUST TO MERGE THE SAME AND OFTEN ACTIONS SIMPLY TO ONE EVENT) ===== # playersListGuiClickDifferentShowOneTime: type: call conditions: - '%show% == wait and %CEP_customData_tempget_pGUIListCurSlot_{player}% == NoData execute wait' # Actions to show item when nothing is happening currently and the system is waiting for user actions (for example when user clicks to some setting and returns back, then this item will be shown, but we also need to be sure that currently there is none list which is already loaded) - '%show% == load execute load' # Actions to perform once at the start of list loading - '%show% == loadFinish and %CEP_customData_tempget_pGUICurListLength_{player}% > 20 execute loadFinish' # Finish loading the list and show the pages if amount of players in the list is more than 20 - '%show% == loadFinish execute loadFinishAlways' # Finish loading the list without pages showing (actions which will be performed always after list loading) - '%show% == clearHeads execute clearHeads' # Clear heads - '%show% == updatePages execute updatePages' # Update paper page items (just change the name) - '%show% == setPages execute setPages' # Set paper page items (not just change the name but set the new material too, because this is first list loading) - this is not being used anywhere currently, only inside this event, but perhaps this will be useful for any future tasks actions: setPages: - 'change_item: action:set;target:%player%;newMaterial:PAPER;slot:OPENED|3,OPENED|4,OPENED|6,OPENED|7,OPENED|48,OPENED|49,OPENED|51,OPENED|52;name:§fPage §a№%math_0:UP_{CEP_customData_tempget_pGUIListCurAmount_{player}}/20%;lore:|§8§l\| §2Left-Click §7to choose page' # Set paper page items (not just change the name but set the new material too, because this is first list loading) updatePages: - 'change_item: action:set;target:%player%;slot:OPENED|3,OPENED|4,OPENED|6,OPENED|7,OPENED|48,OPENED|49,OPENED|51,OPENED|52;name:§fPage §a№%math_0:UP_{CEP_customData_tempget_pGUIListCurAmount_{player}}/20%;lore:|§8§l\| §2Left-Click §7to choose page' # Update paper page items (just change the name) clearHeads: - 'change_item: action:set;target:%player%;newMaterial:AIR;slot:OPENED|12,OPENED|13,OPENED|14,OPENED|15,OPENED|16,OPENED|21,OPENED|22,OPENED|23,OPENED|24,OPENED|25,OPENED|30,OPENED|31,OPENED|32,OPENED|33,OPENED|34,OPENED|39,OPENED|40,OPENED|41,OPENED|42,OPENED|43' # Clear heads load: - 'parse_placeholder: %CEP_customData_tempremove_pGUIListCanBeLoadedAgain_{player}%' # Remove "list can be loaded again" variable to prohibit clicking again on the show players button - 'parse_placeholder: %CEP_customData_tempremove_pGUICurListLength_{player}%' # Remove "list length" variable for correct conditions working in the playersListGuiClickPreShow event - 'execute_action_group: clearHeads:100' # CLear heads - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|17,OPENED|44,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53' # Reset all items around the heads - 'change_item: action:reset;target:%player%;slot:OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|17,OPENED|44,OPENED|47,OPENED|48,OPENED|49,OPENED|50,OPENED|51,OPENED|52,OPENED|53;name:0;lore:0' # Reset all items around the heads - 'change_item: action:reset;target:%player%;slot:OPENED|12;lore:0' # Reset the lore of the seacrhing item just in case - 'change_item: action:set;target:%player%;newMaterial:BARRIER;slot:OPENED|12;name:§cLoading...' # Show searching item - 'parse_placeholder: %CEP_customData_tempset_pGUIListLoadingTime_0_{player}%' # Set variable for searching time wait: - 'parse_placeholder: %CEP_customData_tempset_pGUIListCanBeLoadedAgain_true_{player}%' # Set temporary "list can be loaded again" variable to be able to click on show players button again - 'change_item: action:reset;target:%player%;slot:OPENED|12;lore:0' # Reset the lore of the info item - 'change_item: action:set;target:%player%;newMaterial:AXOLOTL_BUCKET;slot:OPENED|12;name:§aWaiting for the actions :)' # Show info item loadFinishAlways: - 'parse_placeholder: %CEP_customData_tempset_pGUIListCurAmount_{math_0:DOWN_min({CEP_customData_tempget_pGUICurListLength_{player}},20)}_{player}%' # Change current amount of showing players variables to the 20 if the list length is 20 or more or to the current players amount in list - 'change_item: action:set;target:%player%;newMaterial:SPYGLASS;slot:OPENED|44;name:§6🔎 §fFind players;lore:§7Find any players in list!||§8§l\| §fUse this to §6find §fdesired players|§8§l\| §fin the list by their §6nicknames§f|§8§l\| §for their §6indeces§f.||§8§l\| §2Left-Click §7to find' # Show the find players item - 'change_item: action:set;target:%player%;newMaterial:BOOK;slot:OPENED|5,OPENED|50;name:§3ℹ §fList info;lore:§7See full information of the list!||§8§l\| §fRequired loading §3time§f: %changeoutput_<=_input:{CEP_customData_tempget_pGUIListLoadingTime_{player}}_matcher:10_ifmatch:§a_else:{changeoutput_<=_input:{CEP_customData_tempget_pGUIListLoadingTime_{player}}_matcher:60_ifmatch:§6_else:§c}%%formatter_number_time_seconds_{CEP_customData_tempget_pGUIListLoadingTime_{player}}%|§8§l\| §7(§a■ §7- fast, §6■ §7- normal, §c■ §7- long)||§8§l\| §fTotal §3players §fin list: §3%CEP_customData_tempget_pGUICurListLength_{player}%|§8§l\| §fTotal §3pages §fin list: §3%math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20%' # Show the information items about current list - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLoadingTime_{player}%' # Remove variable of searching time - 'change_item: action:reset;target:%player%;slot:OPENED|12;name:0;lore:0' # Reset the searching item (without material resetting because at least one head will be shown) - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;0;19;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Start cycle through all current players in list and load first page (SYNC@1 for smooth heads appearing) loadFinish: - 'execute_action_group: loadFinishAlways:100' # Perform always actions - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|53;name:§fNext page §a→ §7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)+1%§7)' # Show next page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|8;name:§fLast page §e→ §7(§e%math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20%§7)' # Show last page item - 'execute_action_group: setPages:100' # Set paper page items # ===== CYCLE WITH CALL EVENT TO CHECK LIST STATE AND PERFORM ACTIONS WHEN THE LIST IS LOADED OR SOME ERRORS ARE POPPED UP ===== # playersListGuiClickPreShow: type: call conditions: - '%CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% == %empty% execute showError{%material%=BEDROCK;%error%=§cNone players;%additional%=%empty%;%pitch%=1.0}' # If there are none players in the current list, throw appropriate error and show appropriate item - '%CEP_customData_tempget_pGUIListOutput_{player}% == NoData execute showError{%material%=ORANGE_CONCRETE;%error%=§6WARN§7: §eOutput information should not be empty!;%additional%=%empty%;%pitch%=1.5}' # If the output is empty, throw appropriate error and show appropriate item - '%CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% == InvalidExpression execute showError{%material%=RED_CONCRETE;%error%=§4ERROR§7: §cConditions are incorrect!;%additional%=%empty%;%pitch%=0.5}' # If list returned to us invalid conditions state, throw appropriate error and show appropriate item - '%CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% == InvalidOutputPlaceholder execute showError{%material%=RED_CONCRETE;%error%=§4ERROR§7: §cList output contains invalid/non-existent placeholders!;%additional%=§cMake sure all your placeholders there are correct!;%pitch%=0.5}' # If list returned to us invalid output state, throw appropriate error and show appropriate item - '%CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% contains { or %CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% contains } execute showError{%material%=RED_CONCRETE;%error%=§4ERROR§7: §cList output contains invalid/non-existent placeholders!;%additional%=§cMake sure all your placeholders there are correct!;%pitch%=0.5}' # If there are any non-parsed placeholders in the output, throw appropriate error and show appropriate item - '%showAfterChoosingPage% == true execute showAfterChoosingPage' # Show the list after page choosing (paper items) - '%CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% != Loading... and %CEP_customData_tempget_pGUIListLoaded_{player}% == true and %CEP_array_ASYNC:ListLength{CEP_replaceMulti_ᵕ=~_{player}}% != Loading... execute showSuccess' # Show the list after its regular loading and after all necessary variables are parsed - '%CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}% != Loading... and %CEP_customData_tempget_pGUIListLoaded_{player}% == NoData execute preShowSuccess' # Perform pre show actions (necessary variables parsing), to show further the list after its regular loading actions: default: - 'wait: 1' - 'parse_placeholder: %CEP_customData_tempincrease_pGUIListLoadingTime_1_{player}%' # Increase variable for searching time - 'change_item: action:set;target:%player%;slot:OPENED|12;lore:§7Spent time: %formatter_number_time_seconds_{CEP_customData_tempget_pGUIListLoadingTime_{player}}%' # Update searching item lore with increased searching time - 'call_event: playersListGuiClickPreShow' # Call the event again to make the cycle preShowSuccess: - 'parse_placeholder: %CEP_customData_tempset_pGUIListLoaded_true_{player}%' # Set variable which defines that the list was loaded (we need it to know exactly that list was loaded and we are currently parsing the list length variable, that is why we can not get rid of this variable and just use list variable as indicator) - 'parse_placeholder: %CEP_array_ASYNC:ListLength{CEP_replaceMulti_ᵕ=~_{player}}_,_GL_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%' # Start parsing loaded list length to set it further to the variable - 'execute_action_group: default:100' # Continue cycle until the length value will not be parsed showSuccess: - 'parse_placeholder: %CEP_customData_tempremove_pGUIListLoaded_{player}%' # Remove "list loaded" variable - 'parse_placeholder: %CEP_customData_tempset_pGUICurListLength_{CEP_array_ASYNC:ListLength{CEP_replaceMulti_ᵕ=~_{player}}}_{player}%' # Set loaded list length to the variable - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=loadFinish' # Perform finish loading actions - 'playsound: BLOCK_NOTE_BLOCK_PLING;10;1.0' # Success sound showAfterChoosingPage: - 'manage_cycle: SYNC@1;run;playersListGuiClickShow;%math_0:DOWN_({page}-1)*20%;%math_0:DOWN_min(({page}*20)-1,{CEP_customData_tempget_pGUICurListLength_{player}})%;1;,;%CEP_replaceMulti_ =`_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}%;playersListGuiClickShow;%player%' # Start cycle through all current players in list and load chosen page (SYNC@1 for smooth heads appearing) - 'parse_placeholder: %CEP_customData_tempset_pGUIListCurAmount_{math_0:DOWN_min({page}*20,{CEP_customData_tempget_pGUICurListLength_{player}})}_{player}%' # Change current amount of showing players variable - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|53;name:§fNext page §a→ §7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)+1%§7)' # Update next page item - 'change_item: action:set;target:%player%;newMaterial:ARROW;slot:OPENED|47;name:§7(§a%math_0:UP_({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)-1%§7) §a← §fPrevious page' # Update previous page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|2;name:§7(§e1§7) §e← §fFirst page' # Update first page item - 'change_item: action:set;target:%player%;newMaterial:SPECTRAL_ARROW;slot:OPENED|8;name:§fLast page §e→ §7(§e%math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20%§7)' # Update last page item - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=updatePages' # Update choose page items (paper items) - 'execute_action_group: %changeoutput_>=_input:{CEP_customData_tempget_pGUIListCurAmount_{player}}_matcher:{CEP_customData_tempget_pGUICurListLength_{player}}_ifmatch:nextPageRemove_else:none%:100' # If there are none pages further, remove next page items - 'execute_action_group: %changeoutput_<=_input:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20}_matcher:0_ifmatch:prevPageRemove_else:none%:100' # If there are none pages before, remove previous page items - 'playsound: BLOCK_NOTE_BLOCK_PLING;10;1.0' # Success sound nextPageRemove: - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|8,OPENED|53' # Remove previous next items - 'change_item: action:reset;target:%player%;slot:OPENED|8,OPENED|53;name:0;lore:0' # Remove previous next items prevPageRemove: - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|2,OPENED|47' # Remove previous page items - 'change_item: action:reset;target:%player%;slot:OPENED|2,OPENED|47;name:0;lore:0' # Remove previous page items showError: - 'parse_placeholder: %CEP_customData_tempset_pGUIListCanBeLoadedAgain_true_{player}%' # Set temporary "list can be loaded again" variable to be able to click on show players button again - 'change_item: action:reset;target:%player%;slot:OPENED|12;name:0;lore:0' # Reset the searching item to not interfere with lore and name (without material resetting because the error item will be shown) - 'change_item: action:set;target:%player%;newMaterial:%material%;slot:OPENED|12;name:%error%%changeoutput_equals_input:{additional}_matcher:{empty}_ifmatch:_else:;lore:{additional}%' # Show error item - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;%pitch%' # Error sound # ===== ACTIONS FOR LIST SHOWING WHICH ARE PERFORMED WHEN THE LIST IS LOADED ===== # playersListGuiClickShow: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%v% == %v% execute show{%vl%=%CEP_replaceMulti_>=\\>:<=\\<:`= _{v}%}' # Perform showing actions (just a condition to transfer the variable with fixes, for example when some output placeholders are incorrect and became just {}, we need to change it to <> to avoid errors) actions: start: - 'parse_placeholder: %CEP_customData_tempset_pGUIListCurSlot_0_{player}%' # Each new showing set the slot counter to 0 - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=clearHeads' # Each new showing remove old heads - 'change_item: action:reset;target:%player%;slot:OPENED|17;name:0;lore:0' # Clear the real info item (to start checking in playersListGuiClickShow event and show back when page will be fully loaded) - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|17' # Clear the real info item (to start checking in playersListGuiClickShow event and show back when page will be fully loaded) show: - 'execute_action_group: %changeoutput_equals_input:{start}_matcher:true_ifmatch:start_else:none%:100' # If show new part of players, perform actions for new showing correct launching (perhaps player clicks on the page buttons too fast) - 'change_item: action:set;target:%player%;newMaterial:%changeoutput_equals_input:{CEP_array_=_GBI_{vl}_2}_matcher:yes_ifmatch:PLAYER_HEAD;skullOwner:{CEP_array_=_GBI_{vl}_1}_else:SKELETON_SKULL%;slot:OPENED|%CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25,30,31,32,33,34,39,40,41,42,43_{CEP_customData_tempget_pGUIListCurSlot_{player}}%;name:§e%CEP_array_=_GBI_{vl}_0% §8(%changeoutput_equals_input:{CEP_array_=_GBI_{vl}_2}_matcher:yes_ifmatch:§aONLINE_else:§7OFFLINE%§8) §f#%math_0:DOWN_({CEP_customData_tempget_pGUIListCurAmount_{player}}-{changeoutput_equals_input:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20*floor({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)}_matcher:0_ifmatch:20_else:{math_0:DOWN_{CEP_customData_tempget_pGUIListCurAmount_{player}}-20*floor({CEP_customData_tempget_pGUIListCurAmount_{player}}/20)}})+({CEP_customData_tempget_pGUIListCurSlot_{player}}+1)%;lore:|%CEP_replaceMulti_\$=$:\@=@:|=|§f_§f{CEP_array_=_GBI_{vl}_3}%||§8§l\| §2Left-Click §7to copy the info' # Change the item on the head slot - 'parse_placeholder: %CEP_customData_tempincrease_pGUIListCurSlot_1_{player}%' # Increase local counter for slots (it is needed here to choose slot correctly, because index %i% may be not only from 0 to 19, but also bigger) - 'execute_action_group: %changeoutput_equals_input:{end}_matcher:true_ifmatch:end_else:none%:100' # Perform ending actions end: - 'change_item: action:set;target:%player%;newMaterial:ENDER_EYE;slot:OPENED|17;name:§3👁 §fShow real info on the page;lore:§7Show real UUIDs and skins on the heads!||§8§l\| §fAfter §3clicking §fit will require|§8§l\| §fsmall §3delay §fto display all §3changes§f.|§8§l\| §fYou will §3not §fbe able to §3interact §fwith|§8§l\| §fall §3options §funtil the process will not be §3ended§f.||§8§l\| §2Left-Click §7to show' - 'parse_placeholder: %CEP_customData_tempset_pGUIListCanBeLoadedAgain_true_{player}%' # Set temporary "list can be loaded again" variable to be able to click on show players button again # We are not clearing pGUIListCurSlot here nohow to use it in other events like playersListGuiClickDifferentShowOneTime # ===== ACTIONS TO MAKE "ANIMATION" WHILE DIFFERENT THINGS ARE LOADING ===== # playersListGuiClickLoadingAnimation: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%start% == true execute start' - '%end% == true execute again' actions: default: - 'change_item: action:set;target:%player%;newMaterial:%CEP_customData_tempget_pGUILoadingAnimationCurItem_{player}%;slot:OPENED|%v%' # Change the items around the head slots - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;%CEP_customData_tempget_pGUILoadingAnimationCurPitch_{player}%' # Success sound - 'parse_placeholder: %CEP_customData_tempset_pGUILoadingAnimationCurItem_{changeoutput_equals_input:{CEP_customData_tempget_pGUILoadingAnimationCurItem_{player}}_matcher:GREEN_STAINED_GLASS_PANE_ifmatch:LIMEᵕSTAINEDᵕGLASSᵕPANE_else:GREENᵕSTAINEDᵕGLASSᵕPANE}_{player}%' # Change temporary variable with current item for animation - 'parse_placeholder: %CEP_customData_tempincrease_pGUILoadingAnimationCurPitch_0.2_{player}%' # Increase temporary variable with current sound pitch start: - 'parse_placeholder: %CEP_customData_tempset_pGUILoadingAnimationCurItem_GREENᵕSTAINEDᵕGLASSᵕPANE_{player}%' # Set temporary variable with current item for animation - 'parse_placeholder: %CEP_customData_tempset_pGUILoadingAnimationCurPitch_0.1_{player}%' # Set temporary variable with current sound pitch - 'execute_action_group: default:100' # Still perform animation step again: - 'execute_action_group: default:100' # Still perform animation step - 'manage_cycle: ASYNC~3@3;run;playersListGuiClickLoadingAnimation;0;last;1;,;47,38,29,20,11,2,3,4,5,6,7,8,17,26,35,44,53,52,51,50,49,48;playersListGuiClickLoadingAnimation;%player%' # Run a loading "animation" again (already with start delay) - 'wait_ticks: 3' # Run animation again above, but wait here until panes clearing to leave the last pane for some time - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|47,OPENED|38,OPENED|29,OPENED|20,OPENED|11,OPENED|2,OPENED|3,OPENED|4,OPENED|5,OPENED|6,OPENED|7,OPENED|8,OPENED|17,OPENED|26,OPENED|35,OPENED|44,OPENED|53,OPENED|52,OPENED|51,OPENED|50,OPENED|49,OPENED|48' # Clear all current loading panes # ===== ACTIONS TO SHOW REAL PLAYERS INFO ===== # playersListGuiClickShowRealInfo: type: call conditions: - '%CEP_item_material_,_OPENED|{CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25,30,31,32,33,34,39,40,41,42,43_{i}}% != WITHER_SKELETON_SKULL' # If player does not exist, for example when user found some players and not all of them exist, do not change the item actions: default: - 'parse_placeholder: %CEP_customData_tempset_pGUIShowRealInfoItemLore_{CEP_replaceMulti_ᵕ=\\ᵕ:>=\\>:<=\\<:|=\|_{CEP_item_lore_;_OPENED|{CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25,30,31,32,33,34,39,40,41,42,43_{i}}}}_{player}%' # Set temporary variable with lore - 'change_item: action:reset;target:%player%;slot:OPENED|%CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25,30,31,32,33,34,39,40,41,42,43_{i}%;lore:0' # Reset the lore of the current item - 'change_item: action:set;target:%player%;newMaterial:PLAYER_HEAD;%changeoutput_contains_input:;;Error;null;Error: null;_matcher:;{CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{v}}_,_{v}};_ifmatch:_else:skullUUID:{CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{v}}_,_{v}};skullOwner:{v};%slot:OPENED|%CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25,30,31,32,33,34,39,40,41,42,43_{i}%;lore:§7Licensed UUID: %changeoutput_contains_input:;;Error;null;Error: null;_matcher:;{CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{v}}_,_{v}};_ifmatch:§4None_else:§2{CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{v}}_,_{v}}%|%CEP_replaceMulti_>=\\>:<=\\<:;=|_{CEP_customData_tempget_pGUIShowRealInfoItemLore_{player}}%' # Change the item on the head slot - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoItemLore_{player}%' # Remove temporary variable with lore # ===== ACTIONS TO SHOW THE PLAYER INFO FOR COPYING ===== # playersListGuiClickCopyPlayerInfo: type: call actions: default: - 'json_message: ["",{"text":"| ","bold":true,"color":"dark_gray"},{"text":"%CEP_replaceMulti_`= :>=\\>:<=\\<_{v}%","clickEvent":{"action":"copy_to_clipboard","value":"%CEP_replaceMulti_`= :§=&:>=\\>:<=\\<_{v}%"},"hoverEvent":{"action":"show_text","contents":"%CEP_replaceMulti_`= :>=\\>:<=\\<_{v}%"}}]' # Text with information from the current lore line # ===== ACTIONS FOR RETURNING BACK TO THE MENU WHILE COPYING THE PLAYER INFO ===== # playersListGuiClickCopyPlayerInfoReturnToMenu: type: player_command conditions: - '%CEP_customData_tempget_pGUICopyPlayerInfo_{player}% == true' # Allow execution only if the player is now in the "copying player info" state - '%command% == /*CANCEL* execute cancel' # Return back to the menu actions: cancel: - 'cancel_event: true' # Player should not write it to the chat - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUICopyPlayerInfo_{player}%' # Remove "copying player info" variable when returning to the menu - 'playsound: BLOCK_NOTE_BLOCK_BELL;10;1.0' # Return sound # ===== ACTIONS TO SAVE REAL INFO (LICENSED UUID AND SKIN ON THE HEAD) OF THE PLAYERS ON THE CURRENT PAGE ===== # playersListGuiClickSaveRealInfo: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%CEP_item_name_,_OPENED|{v}% == ItemNotFound execute endWithout' # Finish the cycle and launch the waiting while all real info will be loaded if the player does not exist on the slot - '%end% == true execute end{%nick%=%string_substring_2_{CEP_array_ _GBI_{CEP_item_name_,_OPENED|{v}}_0}%}' # Finish the cycle and launch the waiting while all real info will be loaded - '%v% == %v% execute parse{%nick%=%string_substring_2_{CEP_array_ _GBI_{CEP_item_name_,_OPENED|{v}}_0}%}' # Just a condition to convenient transfer the variable of the player name actions: parse: - 'parse_placeholder: %CEP_customData_tempset_pGUIShowRealInfoNicks_{CEP_replaceMulti_ᵕ=\\ᵕ_{changeoutput_equals_input:{CEP_customData_tempget_pGUIShowRealInfoNicks_{player}}_matcher:NoData_ifmatch:_else:{CEP_customData_tempget_pGUIShowRealInfoNicks_{player}},}{nick}}_{player}%' # Save all current nicks to use them further in waiting checks - 'parse_placeholder: %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{nick}}_,_{nick}%' # Get and save real UUID of the player asynchronously end: - 'execute_action_group: parse:100' # Do the same - 'call_event: playersListGuiClickShowRealInfoWaiting;%nicks%=%CEP_customData_tempget_pGUIShowRealInfoNicks_{player}%' # Launch the waiting while all real info will be loaded - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoNicks_{player}%' # Remove the saved nicks for the future tasks endWithout: - 'manage_cycle: ASYNC;break;playersListGuiClickSaveRealInfo' # Break cycle through all current showing players - 'call_event: playersListGuiClickShowRealInfoWaiting;%nicks%=%CEP_customData_tempget_pGUIShowRealInfoNicks_{player}%' # Launch the waiting while all real info will be loaded - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoNicks_{player}%' # Remove the saved nicks for the future tasks # ===== ACTIONS TO WAIT UNTIL REAL INFO WILL BE LOADED ===== # playersListGuiClickShowRealInfoWaiting: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_0}}_,_{CEP_array_,_GBI_{nicks}_0}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_1}}_,_{CEP_array_,_GBI_{nicks}_1}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_2}}_,_{CEP_array_,_GBI_{nicks}_2}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_3}}_,_{CEP_array_,_GBI_{nicks}_3}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_4}}_,_{CEP_array_,_GBI_{nicks}_4}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_5}}_,_{CEP_array_,_GBI_{nicks}_5}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_6}}_,_{CEP_array_,_GBI_{nicks}_6}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_7}}_,_{CEP_array_,_GBI_{nicks}_7}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_8}}_,_{CEP_array_,_GBI_{nicks}_8}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_9}}_,_{CEP_array_,_GBI_{nicks}_9}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_10}}_,_{CEP_array_,_GBI_{nicks}_10}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_11}}_,_{CEP_array_,_GBI_{nicks}_11}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_12}}_,_{CEP_array_,_GBI_{nicks}_12}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_13}}_,_{CEP_array_,_GBI_{nicks}_13}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_14}}_,_{CEP_array_,_GBI_{nicks}_14}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_15}}_,_{CEP_array_,_GBI_{nicks}_15}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_16}}_,_{CEP_array_,_GBI_{nicks}_16}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_17}}_,_{CEP_array_,_GBI_{nicks}_17}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_18}}_,_{CEP_array_,_GBI_{nicks}_18}}% != Loading... and %CEP_entity_realUUID:ASYNC={CEP_replaceMulti_ᵕ=~_{CEP_array_,_GBI_{nicks}_19}}_,_{CEP_array_,_GBI_{nicks}_19}}% != Loading... execute loadedSuccessfully' # Check whether the real info about all current players is loaded actions: default: - 'wait: 1' - 'call_event: playersListGuiClickShowRealInfoWaiting;already_stored' loadedSuccessfully: - 'parse_placeholder: %CEP_customData_tempset_pGUIShownRealInfo_true_{player}%' # Set temporary "shown real info" variable to not show again the list of players when we for example go to copy the info and return back and many other cases - 'parse_placeholder: %CEP_customData_tempset_pGUIShowRealInfoCloseProtection_true_{player}%' # Set temporary "prohibiter" to not detect inventory closing - 'manage_cycle: ASYNC;break;playersListGuiClickLoadingAnimation' # Stop loading "animation" - 'console_command: ce interrupt playersListGuiClickLoadingAnimation %player% silent:true' # Stop loading "animation" - 'wait_ticks: 1' - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the normal inventory back to the player - 'wait_ticks: 1' - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|38,OPENED|11' # Return gray panes on each unoccupied slot of previous loading "animation" - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoCloseProtection_{player}%' # Remove temporary "prohibiter" - 'manage_cycle: SYNC;run;playersListGuiClickShowRealInfo;0;last;1;,;%nicks%;playersListGuiClickShowRealInfo;%player%' # Run cycle through all current players to show their real info - 'parse_placeholder: %CEP_customData_tempremove_pGUIShowRealInfoProcess_{player}%' # Remove "real info process" variable - 'playsound: BLOCK_NOTE_BLOCK_PLING;10;1.0' # ===== ACTIONS WHEN FINDING THE PLAYERS IN THE LIST ===== # playersListGuiClickFindPlayer: type: player_command conditions: - '%CEP_customData_tempget_pGUIFindPlayer_{player}% == true' # Allow execution only if the player is now in the "finding player" state - '%command% == /*CANCEL* execute cancel' # Return back to the menu without showing page of players again - '%command% == /*RESET* execute reset' # Return back to the menu with showing page of players again - '%string_substring_1_{command}% == %empty% execute errors{%error%=&cSpecify at least one player!}' # If user provided empty input, throw appropriate error - '%command% matches .*[%{};|].* execute errors{%error%=&cNicknames should not contain percents, semicolons, braces and vertical bars!}' # If provided input contains prohibited symbols, throw appropriate error - '%CEP_array_,_CHECK_{string_substring_1_{command}}_$val@!matches^(?:[A-Za-z0-9ᵕ]{3,16}|i:[0-9]+)$% == true execute errors{%error%=&cSome nicknames or indeces are incorrect! Only A-Z, a-z and 0-9 characters are allowed, as well as the length should be from 3 to 16 (for nicknames). Or if you specified indeces, make sure they are numbers!}' # If user provided invalid nickname or index, throw appropriate error - '%CEP_array_,_CHECK_{string_substring_1_{command}}_$val@matches^i:[0-9]+\$ AND ($string_substring_2_$val@@>{CEP_customData_tempget_pGUICurListLength_{player}} OR $string_substring_2_$val@@<1)% == true execute errors{%error%=&cSome indeces are incorrect! Make sure they are smaller than list length and bigger than 0!}' # If user provided too big or too small index, throw appropriate error actions: default: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempset_pGUIFoundPlayers_true_{player}%' # Set temporary "found players" variable to not show again the list of players when we for example go to copy the info and return back and many other cases - 'manage_inventory: action:?open;inventory:PlayersListGUISavedEmpty%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayer_{player}%' # Remove "finding player" variable - 'parse_placeholder: %CEP_customData_tempset_pGUIFindPlayerProcess_true_{player}%' # Set temporary "finding player process" variable to be able to know that the user in the loading process currently - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=clearHeads' # Clear heads - 'change_item: action:set;target:%player%;newMaterial:BARRIER;slot:OPENED|12;name:§cSearching...' # Show waiting item - 'parse_placeholder: %CEP_customData_tempset_pGUIFindingPlayersLoadingTime_0_{player}%' # Set waiting timer variable - 'manage_cycle: ASYNC@%math_0:DOWN_max(1,floor(0.95*(({CEP_customData_tempget_pGUICurListLength_{player}}/10)^0.60)-0.8))%;run;playersListGuiClickFindPlayerProcess1;0;last;1;,;%CEP_array_,_GP_{string_substring_1_{command}}_0_4%;playersListGuiClickFindPlayerProcess1;%player%' # Run cycle through specified players limiting by 10 (the formula here is for delay between launches, the bigger list the more time we need between launches to find player in the list) (actually the formula is not needed when we specified the index, but to not complicate the implementation we remain it as it is, the user just will wait longer and there is none horrible here) - 'manage_cycle: ASYNC@3;run;playersListGuiClickLoadingAnimation;0;last;1;,;47,38,29,20,11,2,3,4,5,6,7,8,17,26,35,44,53,52,51,50,49,48;playersListGuiClickLoadingAnimation;%player%' # Make a loading "animation" - 'call_event: playersListGuiClickFoundPlayersWaitingTimer' # Launch the waiting timer cancel: - 'cancel_event: true' # Player should not write it to the chat - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayer_{player}%' # Remove "finding player" variable when returning to the menu - 'playsound: BLOCK_NOTE_BLOCK_BELL;10;1.0' # Return sound reset: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to show again the list of players - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to show again the list of players - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayer_{player}%' # Remove "finding player" variable when returning to the menu - 'playsound: BLOCK_NOTE_BLOCK_BIT;10;1.0' # Success sound errors: - 'cancel_event: true' # Player should not write it to the chat - 'message: &r' # Error message - 'message: %error%' # Error message - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;0.5' # Error sound # ===== ACTIONS TO COUNT HOW LONG THE WAITING IS (FOR FINDING THE PLAYERS IN THE LIST) ===== # playersListGuiClickFoundPlayersWaitingTimer: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) actions: default: - 'wait: 1' - 'parse_placeholder: %CEP_customData_tempincrease_pGUIFindingPlayersLoadingTime_1_{player}%' # Increase timer - 'change_item: action:set;target:%player%;slot:OPENED|12;lore:§7Spent time: %formatter_number_time_seconds_{CEP_customData_tempget_pGUIFindingPlayersLoadingTime_{player}}%' # Update waiting item - 'call_event: playersListGuiClickFoundPlayersWaitingTimer' # Call event again # ===== ACTIONS TO FIND SPECIFIED PLAYERS IN THE LIST (FIRST STEP) ===== # playersListGuiClickFindPlayerProcess1: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%end% == true execute end' # Finish the cycle and launch the waiting while all data will be successfully loaded - '%v% startsWith i: execute index' # If current value is index in the list, process it correctly actions: default: - 'parse_placeholder: %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}}={i}_,_GIBV_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}_$val@startsWith{CEP_replaceMulti_ᵕ=\\ᵕ_{v}}=%' # Find appropriate index in the array where the current player is index: - 'parse_placeholder: %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}}={i}_,_G_{math_0:DOWN_{string_substring_2_{v}}-1}%' # Just save the specified index end: - 'execute_action_group: %changeoutput_equals_input:{string_startsWith_{v}_i:}_matcher:true_ifmatch:index_else:default%:100' # If finish the cycle still perform last parse - 'call_event: playersListGuiClickFoundPlayersWaiting;%nicks%=%CEP_replaceMulti_i\:={empty}_{a}%' # Launch the waiting while all data will be loaded (%a% is the current players array, just indeces tags are replaced to nothing) # ===== ACTIONS TO WAIT UNTIL ALL SPECIFIED PLAYERS WILL BE FOUND ===== # playersListGuiClickFoundPlayersWaiting: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=0}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=1}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=2}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=3}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=4}% != Loading... execute loadedSuccessfully' # Check whether the all specified players are found actions: default: - 'wait: 1' - 'call_event: playersListGuiClickFoundPlayersWaiting;already_stored' # Call event again to make a cycle loadedSuccessfully: - 'parse_placeholder: %CEP_customData_tempset_pGUIFoundPlayersIndeces_{CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=0}},{CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=1}},{CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=2}},{CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=3}},{CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=4}}_{player}%' # Set temporary variable with found players indeces to use them as positions of the players in the list - 'manage_cycle: ASYNC@%math_0:DOWN_max(1,floor(0.95*(({CEP_customData_tempget_pGUICurListLength_{player}}/10)^0.60)-0.8))%;run;playersListGuiClickFindPlayerProcess2;0;last;1;,;%nicks%;playersListGuiClickFindPlayerProcess2;%player%' # Run cycle through found indeces of players to obtain values on these indeces (the formula here is for delay between launches, the bigger list the more time we need between launches) # ===== ACTIONS TO FIND SPECIFIED PLAYERS IN THE LIST (SECOND/LAST STEP) ===== # playersListGuiClickFindPlayerProcess2: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%end% == true execute end' # Finish the cycle and launch the waiting while all data will be successfully loaded actions: default: - 'parse_placeholder: %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}}={i}_,_GBI_{CEP_list_ASYNC:pGUI{CEP_replaceMulti_ᵕ=~_{player}}}_{CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}}={i}}%' # Get appropriate value of the player by the index in the array end: - 'execute_action_group: default:100' # If finish the cycle still perform last parse - 'call_event: playersListGuiClickFoundPlayersWaitingFinally;%nicks%=%a%' # Launch the waiting while all data will be loaded (%a% is the current players array) # ===== ACTIONS TO WAIT UNTIL ALL SPECIFIED PLAYERS WILL BE FINALLY FOUND ===== # playersListGuiClickFoundPlayersWaitingFinally: type: call conditions: - '%CEP_customData_tempget_pGUIClosedProtection_{player}% == NoData' # Make sure that the async actions certainly will not be executed after menu closing (for example, when interrupting execution with setting different settings) - '%CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=0}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=1}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=2}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=3}% != Loading... and %CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}=4}% != Loading... execute loadedSuccessfully' # Check whether the all specified players are found actions: default: - 'wait: 1' - 'call_event: playersListGuiClickFoundPlayersWaitingFinally;already_stored' # Call event again to make a cycle loadedSuccessfully: - 'parse_placeholder: %CEP_customData_tempset_pGUIFoundPlayersCloseProtection_true_{player}%' # Set temporary "prohibiter" to not detect inventory closing - 'manage_cycle: ASYNC;break;playersListGuiClickLoadingAnimation' # Stop loading "animation" - 'console_command: ce interrupt playersListGuiClickLoadingAnimation %player% silent:true' # Stop loading "animation" - 'console_command: ce interrupt playersListGuiClickFoundPlayersWaitingTimer %player% silent:true' # Stop waiting timer - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindingPlayersLoadingTime_{player}%' # Remove "waiting timer" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIFindPlayerProcess_{player}%' # Remove "finding player process" variable - 'wait_ticks: 1' - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the normal inventory back to the player - 'call_event: playersListGuiClickDifferentShowOneTime;%show%=clearHeads' # Clear heads - 'wait_ticks: 1' - 'change_item: action:set;target:%player%;newMaterial:GRAY_STAINED_GLASS_PANE;slot:OPENED|38,OPENED|11' # Return gray panes on each unoccupied slot of previous loading "animation" - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayersCloseProtection_{player}%' # Remove temporary "prohibiter" - 'manage_cycle: SYNC;run;playersListGuiClickFindPlayerFoundPlayers;0;last;1;,;%nicks%;playersListGuiClickFindPlayerFoundPlayers;%player%' # Run cycle through all found players - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayersIndeces_{player}%' # Remove "found players indeces" variable - 'change_item: action:set;target:%player%;newMaterial:ENDER_EYE;slot:OPENED|17;name:§3👁 §fShow real info on the page;lore:§7Show real UUIDs and skins on the heads!||§8§l\| §fAfter §3clicking §fit will require|§8§l\| §fsmall §3delay §fto display all §3changes§f.|§8§l\| §fYou will §3not §fbe able to §3interact §fwith|§8§l\| §fall §3options §funtil the process will not be §3ended§f.||§8§l\| §2Left-Click §7to show' # Perhaps real info item was already used, then we need to return it to be able to apply it on found players - 'playsound: BLOCK_NOTE_BLOCK_PLING;10;1.0' # ===== ACTIONS WHEN PLAYERS ARE FOUND IN THE LIST AFTER FINDING THEM IN THE LIST ===== # playersListGuiClickFindPlayerFoundPlayers: type: call conditions: - '%v% == %v% execute preFound{%vl%=%CEP_array_ASYNC:{CEP_replaceMulti_ᵕ=~_{player}}={i}%}' # Show the item of the player (just a condition to conveniently transfer the variable) actions: preFound: - 'execute_action_group: %changeoutput_equals_input:{vl}_matcher:{empty}_ifmatch:notFound_else:found%:100' # If player does not exist in the list, show an "unexisting player" item found: - 'change_item: action:set;target:%player%;newMaterial:%changeoutput_equals_input:{CEP_array_=_GBI_{vl}_2}_matcher:yes_ifmatch:PLAYER_HEAD;skullOwner:{CEP_array_=_GBI_{vl}_1}_else:SKELETON_SKULL%;slot:OPENED|%CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25_{i}%;name:§e%CEP_array_=_GBI_{vl}_0% §8(%changeoutput_equals_input:{CEP_array_=_GBI_{vl}_2}_matcher:yes_ifmatch:§aONLINE_else:§7OFFLINE%§8) §f#%math_0:DOWN_{CEP_array_,_GBI_{CEP_customData_tempget_pGUIFoundPlayersIndeces_{player}}_{i}}+1%;lore:|%CEP_replaceMulti_\$=$:\@=@:|=|§f_§f{CEP_array_=_GBI_{vl}_3}%||§8§l\| §2Left-Click §7to copy the info' # Change the item on the head slot notFound: - 'change_item: action:set;target:%player%;newMaterial:WITHER_SKELETON_SKULL;slot:OPENED|%CEP_array_,_GBI_12,13,14,15,16,21,22,23,24,25_{i}%;name:§e%v% §cnot found!' # Change the item on the head slot # ===== ACTIONS WHEN CHOOSING THE PAGE IN THE LIST ===== # playersListGuiClickChoosePage: type: player_command conditions: - '%CEP_customData_tempget_pGUIChoosePage_{player}% == true' # Allow execution only if the player is now in the "choosing page" state - '%command% == /*CANCEL* execute cancel' # Return back to the menu - '%is_number_{string_substring_1_{command}}% == false execute errors{%error%=&cPage should be a number!}' # If page is not a number, throw appropriate error - '%string_substring_1_{command}% < 1 execute errors{%error%=&cPage number should be positive!}' # If page does not exist, throw appropriate error - '%string_substring_1_{command}% > %math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20% execute errors{%error%=&cPage number is too big! Maximum page: %math_0:UP_{CEP_customData_tempget_pGUICurListLength_{player}}/20%}' # If page is too big, throw appropriate error actions: default: - 'cancel_event: true' # Player should not write it to the chat - 'parse_placeholder: %CEP_customData_tempremove_pGUIClosedProtection_{player}%' # Remove "closed protection" variable - 'parse_placeholder: %CEP_customData_tempremove_pGUIChoosePage_{player}%' # Remove "choosing page" variable after entering the page - 'parse_placeholder: %CEP_customData_tempremove_pGUIFoundPlayers_{player}%' # Remove "found players" variable to show again the list of players - 'parse_placeholder: %CEP_customData_tempremove_pGUIShownRealInfo_{player}%' # Remove "shown real info" variable to show again the list of players - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'call_event: playersListGuiClickPreShow;%showAfterChoosingPage%=true;%page%=%string_substring_1_{command}%' # Show the list of players on the chosen page cancel: - 'cancel_event: true' # Player should not write it to the chat - 'manage_inventory: action:?open;inventory:PlayersListGUISaved%player%;target:%player%' # Open the inventory back to the player - 'parse_placeholder: %CEP_customData_tempremove_pGUIChoosePage_{player}%' # Remove "finding player" variable when returning to the menu - 'playsound: BLOCK_NOTE_BLOCK_BELL;10;1.0' # Return sound errors: - 'cancel_event: true' # Player should not write it to the chat - 'message: &r' # Error message - 'message: %error%' # Error message - 'playsound: BLOCK_NOTE_BLOCK_DIDGERIDOO;10;0.5' # Error sound