skapa-season-3/kubejs/server_scripts/calendar.js
Steve McMaster 86a1c29baf
All checks were successful
continuous-integration/drone/push Build is passing
Fix breaking storage drawers with axe. No update required, at least I think.
2024-08-06 05:58:44 +00:00

11 lines
502 B
JavaScript

BlockEvents.rightClicked('ags_day_counter:calendar', event => {
if (event.hand != 'off_hand') return;
let playTime = Math.round(event.player.stats.get(Stats.PLAY_TIME) / 24000.0)
let serverDays = parseInt(event.level.dayTime() / 24000.0);
event.player.tell(Component.of('Today is day ').append(Component.green(serverDays)).append('.'))
event.player.tell(Component.of('You have played ').append(Component.green(playTime)).append(' in-game days.'))
event.cancel()
return
});