My friends and I use the day number as part of our server rules, so we want to keep the day from changing while we're offline, but the only way I know of to do that is to stop the server from running…
Minecraft – ny way to keep the minecraft server from going through the day/night cycle when no one’s online
minecraft-java-editionminecraft-java-edition-server
Related Topic
- Minecraft – Best method to create rare items on a minecraft server
- Minecraft – Where does a Minecraft Server keep a list of online players
- Minecraft – How to disable the “/kill” command on Minecraft server
- Minecraft – Keep user data when migrating map from Realms to the server
- Minecraft – How to set up a world that is only daytime, on the same server as one with a normal day/night cycle
- Minecraft – Player getting kicked from Minecraft server the moment player gets their inventory
Best Answer
You should be able to use command blocks to automatically detect whether players are online or not, then appropriately set the
doDaylightCycle
rule appropriately. Try placing the following setup in the server spawn chunks:(Piston is a sticky one.)
The general idea is that the left command checks for online players a few times every second and the comparator next to it will only output a signal if there is at least one player online. Once everyone logs off, the piston retracts and turns off the day/night cycle. As soon as someone logs in again, the comparator will turn on again and toggle the day/night cycle back on.