Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameTime
Syntaxtime ({global}/player) [<time-duration>/reset] (<world>) (reset:<duration>) (freeze)
Short DescriptionChanges the current time in the minecraft world.
Full DescriptionChanges the current time in a world or the time that a player sees the world in.
If no world is specified, defaults to the NPCs world. If no NPC is available,
defaults to the player's world. If no player is available, an error will be thrown.

If 'player' is specified, this will change their personal time.
This is separate from the global time, and does not affect other players.
When that player logs off, their time will be reset to the global time.
Additionally, you may instead specify 'reset' to return the player's time back to global time.
If you specify a custom time, optionally specify 'reset:<duration>'
to set a time after which the player's time will reset (if not manually changed again before then).
Optionally specify 'freeze' to lock a player's time in at the specified time value.
Related Tags<WorldTag.time> Returns the relative in-game time of this world.
<WorldTag.time.period> Returns the time as 'day', 'night', 'dawn', or 'dusk'.
Usage Example
# Use to set the time in the NPC or Player's world.
- time 500t
Usage Example
# Use to make the player see a different time than everyone else.
- time player 500t
Usage Example
# Use to make the player see a different time than everyone else, with the sun no longer moving.
- time player 500t freeze
Usage Example
# Use to make the player see a different time than everyone else for the next 5 minutes.
- time player 500t reset:5m
Usage Example
# Use to make the player see the global time again.
- time player reset
Usage Example
# Use to set the time in a specific world.
- time 500t myworld
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/TimeCommand.java#L28