There are two functions in this script:
- function
GetWorldTime
The hours and minutes of the world time.
getworldtime.js
import { world } from "@minecraft/server";
const { hours, minutes } = GetWorldTime();
world.sendMessage(`The time is ${hours}:${minutes}`);- function
getTimeOfDayGets the name of the time of day
'Sunrise', 'Day', 'Noon', 'Sunset', 'Night', or 'Midnight'
These scripts were written by Jayly#1397 on Jayly Discord, Usernam#2058 on Jayly Discord