Reads or changes the world time.
| Name | Type | Description |
|---|---|---|
ticks | number | New time in ticks (0 is morning, 12000 is sunset). |
world.time() returns the current time in ticks. world.setTime() returns nothing. world.setTime() accepts a number and converts it to a long tick value.
command('morning', { op = true }, function(sender)
world.setTime(0)
server.broadcast("Time set to morning.")
return true
end)
setTime() changes world time immediately and sends the update to clients. The normal world tick continues after setting the time.