Holographic Titles: type: command debug: false name: holotitles description: Used to create holographic titles in the world. usage: /holotitles <&lb>create/remove/move/list<&rb> <&lb>title<&rb> <&lb>text<&rb> aliases: - holo - ht permission: holotitles permission message: <&e>Type /help for a list of commands. allowed help: - determine > tab complete: - if !>: - stop - determine ]]> script: - if !>: - narrate "<&e>Type /help for a list of commands." - stop - choose : - case create: - define title - define text - if <[title]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo create [title] [text]" - stop - else if <[text]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for text. <&nl><&b>Proper format<&co> <&7>/holo create [title] [text]" - stop - else: - define textString ].trim.parse_color> - spawn "armor_stand[custom_name_visible=true;custom_name=<[textString]>;gravity=false;visible=false]" save:standTitle - yaml id:holotitles_list set .<[title]>.location: - yaml id:holotitles_list set .<[title]>.entityName: - yaml id:holotitles_list set .<[title]>.text:<[textString]> - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list - narrate "<&9>Holotitles<&co> <&e>Holo title <&b><[title]> <&e>created at ." - case remove: - define title - if <[title]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo remove [title]" - stop - else: - remove .<[title]>.entityName]> - wait 1t - yaml id:holotitles_list set .<[title]>:! - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list - case move: - define title - define moveX - define moveY - define moveZ - if <[title]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]" - stop - else if <[moveX]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]" - stop - else if <[moveY]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]" - stop - else if <[moveZ]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]" - stop - else: - define entityID .<[title]>.entityName]> - teleport <[entityID]> <[entityID].location.add[<[moveX]>,<[moveY]>,<[moveZ]>]> - yaml id:holotitles_list set .<[title]>.location:<[entityID].location> - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list - case edit: - define title - define text - if <[title]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo edit [title] [text]" - stop - if !.<[title]>]>: - narrate NOPE - else if <[text]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for text. <&nl><&b>Proper format<&co> <&7>/holo edit [title] [text]" - stop - else: - define textString ].trim.parse_color> - adjust .<[title]>.entityName]> custom_name:<[textString]> - yaml id:holotitles_list set .<[title]>.text:<[textString]> - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list - narrate "<&9>Holotitles<&co> <&e>Holo title <&b><[title]> <&e>has been updated." - case list: - define range - if <[range]> == null: - narrate "<&9>Holotitles<&co> <&c>No value entered for range. <&nl><&b>Proper format<&co> <&7>/holo list [range]" - stop - else if !<[range].is_decimal>: - narrate "<&9>Holotitles<&co> <&c>Range value must be a number. <&nl><&b>Proper format<&co> <&7>/holo list [range]" - stop - else if <[range]> > 20: - narrate "<&9>Holotitles<&co> <&c>Range value cannot exceed 20." - else: - define none_found "<&c>No holo titles were found within the specified range." - foreach ]> as:StandName: - define listX .<[StandName]>.location].as_location.x> - define listY .<[StandName]>.location].as_location.y> - define listZ .<[StandName]>.location].as_location.z> - if ].abs> <= <[range]>: - if ].abs> <= <[range]>: - if ].abs> <= <[range]>: - define StandList:->:<[StandName]> - narrate "<&9>Holotitles (<&a><[range]><&9>)<&co> <&b><[StandList].comma_separated.replace[,].with[<&7>,<&b>]||<[none_found]>>" - case check: - define title - if .<[title]>]>: - define entity .<[title]>.entityName].as_entity> - define textSave .<[title]>.entityName].as_entity.custom_name> - adjust <[entity]> "custom_name:<&a>--<>> Current Selection<&co> <&b><[title]> <&a><<>--" - wait 10t - adjust <[entity]> custom_name:<[textSave]> - wait 10t - adjust <[entity]> "custom_name:<&a>--<>> Current Selection<&co> <&b><[title]> <&a><<>--" - wait 10t - adjust <[entity]> custom_name:<[textSave]> - else: - narrate "<&9>Holotitles<&co> <&c>Invalid holo title selected. <&nl><&b>Proper format<&co> <&7>/holo check [title]" - case help: - narrate Help - default: - narrate "<&c>Invalid sub-command! Type /holo help for a list of commands." holotitles_load: type: world debug: false events: on server start: - yaml "load:/yml_saves/holotitles_list.yml" id:holotitles_list