vote_count_yaml:
type: world
events:
on server start:
- - if <server.has_file[/vote_counts/<util.date.time.month>,<util.date.time.year>.yml]> {
- - yaml "load:/vote_counts/<util.date.time.month>,<util.date.time.year>" id:<util.date.time.month>,<util.date.time.year>
- }
- else {
- - yaml create id:<util.date.time.month>,<util.date.time.year>
- }
- on shutdown:
- - yaml "savefile:/vote_counts/<util.date.time.month>,<util.date.time.year>.yml" id:<util.date.time.month>,<util.date.time.year>
- on system time 11:59:
- - announce "<&8>[<&6>Auto Restart<&8>] <&4>Restarting the server in one minute."
- - wait 1m
- - execute as_server "restart"
+ - if <server.has_file[/vote_counts/<util.date.time.month>,<util.date.time.year>.yml]> {
+ - yaml "load:/vote_counts/<util.date.time.month>,<util.date.time.year>" id:<util.date.time.month>,<util.date.time.year>
+ }
+ else {
+ - yaml create id:<util.date.time.month>,<util.date.time.year>
+ }
+ on shutdown:
+ - yaml "savefile:/vote_counts/<util.date.time.month>,<util.date.time.year>.yml" id:<util.date.time.month>,<util.date.time.year>
+ on system time 11:59:
+ - announce "<&8>[<&6>Auto Restart<&8>] <&4>Restarting the server in one minute."
+ - wait 1m
+ - execute as_server "restart"
on votifier vote:
- - yaml id:<util.date.time.month>,<util.date.time.year> set votes.<context.username>/:++
+ - yaml id:<util.date.time.month>,<util.date.time.year> set votes.<context.username>/:++