Short description
A Minecraft/Spigot Plugin that allows to define a custom duration for day and night on the server (change the time/day-night-cycle in game)
The duration of day and night can be set individually.
Install/Setup
- Put the customtime.jar in the "plugins" folder of your spigot server
- Run the server
- Use the commands to set up the plugin to your preferred settings, or change the configuration in the "./plugins/Customtime/config.yml" file. If you change the "config.yml" you will need to restart the server for the changes to take effect.
Available Commands
- /custtomtime on
Starts the custom day night cycle
- /customtime off
Stops the custom day night cycle
- /customtime autostart true|false
Activates/disables the autostart of the custom day night cycle when starting the server
- /customtime duration day|night +int
Set the duration of days and nights in seconds
Settings in the config.yml
- autostart: true|false
start the custom day night cycle with every start of the server (true = start | false = do not activate on startup)
- pollingrate: +int
The polling rate defines how often the server calculates and sets the new in game time. 1 means the in game time will be updated every server tick (approx 20 times per second - more load for the server). 100 means the server will update the in game time every 100 ticks, e.g. every 5 seconds. This costs less performance, but sun and moon might "jump" forward.
- durationDay: +long/+int
The duration of an in game day in seconds (default value of 3600 means 1 Minecraft day from dawn to dusk) takes 1 hour
- durationNight: +long/+int
The duration of an in game night in seconds (default value of 720 means 1 Minecraft night from dusk to dawn) takes 12 minutes
- allowtimechange: true|false
Allow/disallow the use of the "/time set" command (true = allow command, false = disallow command)
- allowsleep: true|false
true allows the players to skip the night by sleeping, true prevents it
- worldname: [name]
Name of the game world (as set in server.properties). Currently, still necessary for this plugin.
- save:
This is an internal value of the plugin that saves the current time on the server (so the custom day-night cycle can continue after a server restart)
Note
I build that plugin a long time ago (I think for Minecraft 1.8) but I keep it updated to the current spigot version. It's probably not the best code I wrote, and I learned a lot since then, but I do not have the spare time for a rewrite and the plugin still does its job very well
