Date: 2020/03/25 12:48:44 UTC-07:00
Type: Denizen Script
- case create:
- define title <context.args.get[2]||null>
- define text <context.args.get[3]||null>
- if <context.args.size||0> != 3:
- narrate "<&9>Holotitles<&co> <&c>Information missing for <&a>move<&c> argument. <&nl><&b>Proper format<&co> <&7>/holo create [title] [text]"
- stop
- if <yaml[holotitles_list].contains[<player.world.name>.<[title]>]>:
- narrate "<&9>Holotitles<&co> <&c>The holo title <&b><[title]> <&c>already exists."
- stop
- define textString <context.raw_args.after[<context.args.get[2]>].trim.parse_color>
- spawn armor_stand[custom_name_visible=true;custom_name=<[textString]>;gravity=false;visible=false] <player.location.center.sub[0,1,0]> save:standTitle
- yaml id:holotitles_list set <player.world.name>.<[title]>.location:<entry[standTitle].spawned_entities.get[1].location>
- yaml id:holotitles_list set <player.world.name>.<[title]>.entityName:<entry[standTitle].spawned_entities.get[1]>
- yaml id:holotitles_list set <player.world.name>.<[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 <player.location.center.sub[0,1,0].xyz.replace[,].with[, ]>."