dvchest: type: world events: on dvchest command: - - determine passively fulfilled - define arg1 - announce - if && { - define player - if { - announce "failed" - announce 'format:dvchest_format' "<&c>That is not a valid player!" to_console - queue clear } - announce "worked" - flag %player% 'dvchestLimit:++:1' - narrate 'format:dvchest_format' "<&6>You can now have <&f> <&6>lines in your dvchest!" 'targets:%player%' - announce 'format:dvchest_format' "<&a> line limit set to " to_console - queue clear } - if ! && ! { - narrate 'format:dvchest_format' "you havn't unlocked dvchest!" - queue clear } + - determine passively fulfilled - inject locally loadYAML - define lines - define dvchest dvchest - note in@generic[title=<&c>dv<&9>Chest;size=;] 'as:%dvchest%' - inventory add 'd:in@%dvchest%' 'o:]>' - narrate ]> - inventory open 'd:in@%dvchest%' on player clicks in inventory: - if ].is[!=].to[in@dvchest]> queue clear - if ]> { - inventory close 'd:in@dvchest' } on player closes inventory: - if ].is[!=].to[in@dvchest]> queue clear - define dvlist - narrate %dvlist% - yaml set 'id:dvchestkey' :%dvlist% - narrate "set" - yaml 'savefile:dvchest/dvchestkey.yml' 'id:dvchestkey' loadYAML: - if ! { - if ! { - yaml create 'id:dvchestkey' - yaml 'savefile:dvchest/dvchestkey.yml' 'id:dvchestkey' } else yaml 'load:dvchest/dvchestkey.yml' 'id:dvchestkey' } dvchest_format: type: format format: <&4><&l>Dv<&8>chest