ActivityLogResetTask: type: task script: - define date h].sub[d@m].sub[d@s]> - if { - - foreach { + - foreach { - yaml savefile:/Logs/].with[_]>.yml id:%value% - yaml unload id:%value% + } + - if ].with[_]>.yml]> { + - yaml load:/Logs/].with[_]>.yml id:my_log_%date% + } else { + - yaml create id:my_log_%date% + } } - } - - if ].with[_]>.yml]> { - - yaml load:/Logs/].with[_]>.yml id:my_log_%date% - } else { - - yaml create id:my_log_%date% - } - - ActivityLogManualSave: type: task script: - define date h].sub[d@m].sub[d@s]> - if { - yaml savefile:/Logs/].with[_]>.yml id:%value% } ActivityLogSaveCommand: type: command name: savelog script: - run ActivityLogManualSave instantly - narrate "Saved log." - determine fulfilled ActivityLogReset: type: world events: on server start: - wait 1t - run ActivityLogResetTask instantly on system time hourly: - run ActivityLogResetTask instantly on system time minutely: - if != 0 queue clear - foreach { - yaml savefile:/Logs/].with[_]>.yml id:%value% } ActivityLogger: type: world events: on player joins: - define date h].sub[d@m].sub[d@util.date.time.second>s]> - if { - yaml id:my_log_%date% set "<&co><&dot>: joined." - flag player login_time: } on player quits: - define date h].sub[d@m].sub[d@util.date.time.second>s]> - if { - yaml id:my_log_%date% set "<&co><&dot>: quit (].formatted>)." - flag player login_time:! }