Hi, I´ve got an idea for a plugin, I don´t know if it is already created but anyway I will post this here. I want to play on a server with some friends, we have a host and all this stuff, but I dont want that time keep going inside the server if there is not any person logged in. I dont know if I´m explaining well. For example: If there is 2/10 players logged in, everything is okay, but if there is 0/10 players in the server, I dont want that the time inside the server keep going, I mean like freeze the time if there is 0/10 players logged in. I don´t know if it´s possible or not, or if this plugin is already created. Anyway, make me know if there is some plugin related to this. Thanks
I think he wants for then time to stop. Mobs, item despawning, flowing of water/lava, no mobs spawn. Basically everything stops. Don't know why he can't simply turn the server off :\
If not Williscool98 's option, then maybe you wanted to check if there is no players online, then stop server? You need to give more precisive informations...
Brixishuge But then the server would have to be manually rebooted. Which is a few clicks, sure, but I'd think he meant either mine or @Hutchmaster99's interpretation.
Unloading chunks? And why not stop the daylightcycle when the last person leaves the server and start it when somebody joins?
I've got a feeling that all mobs despawn when chunks unload. They do have a flag to keep them from despawning if players get too far away, though. Methinks that would fix the problem. Just set it on all mobs when the last player leaves, then clear the flag when someone rejoins.
Yeah, I mean that EVERYTHING stops, just like in singleplayer when you stop playing, but in a multiplayer server. I cant turn off the server because its not actually a host, is a computer running 24/7 in another house, so If we stop the server, we will have to go to that house and turn it on again, thats why I have write this post, because I cant go to that house everyday just to turn on the server I hope you understand all my english.
To be honest, I don't really see the point in this. Mobs will freeze and what not, but is anything big going to happen when a player is not on the server?
anything big? maybe things breaking like iron farms and many other things that Im not able to mention now because I dont remember. This plugin could be also used to reduce the RAM and the resources that the server will be using.
Braveras I'm afraid this is far more complicated than you think. A program has no concept of time. It only appears to be able to tell you time. If you freeze the time in the server, other things will still run. You would have to manually process lots of data to stop those things from running. Its going to be near impossible to cover everything, as well. Especially what other plugins do, like tax/rent collections. Those types of things run on timers and have no real concept of time. There are all sorts of other issues that will come along with trying to freeze time. Why do you want to stop the time? Nothing happens when no one is on the server anyways. Mobs dont spawn/despawn much because most chunks are unloaded. The mobs that are in chunks that stay loaded (spawn chunks) dont even walk around as they are programmed to only move within a certain radius of a player. You can see this if you put your server's view distance at 15 and watch mobs near the horizon. They simply dont do anything. What is it you are ultimately trying to stop from happening while no one is on?
Have you ever heard of MindCrack? They're basically a group of YouTubers on a Minecraft server. I have watched them for quite a while, and so far, they have yet to have major issues with the server. If he really wants it, then we might as well give him the plugin.
If you want to freeze daylight, that would [probably] make sense, but freezing everything will be impossible due to other plugins having timers. There is a function to remove all timers from other plugins, but honestly, a plugin like this won't free a lot of RAM.
A plugin to reset the day/night cycle to where it was when the last player logged off is very simple if that's what he's looking for.
Commander9292 baseman101 Hutchmaster99 Ok lets change the point of view of the plugin. If its so complicated to freeze everything, then, just freeze daylight cycle and try to make another little "improvements" to reduce the RAM that the server is using.
Okay, it won't be too hard to make the daytime cycle stop. Now, as far as mobs, if they're in unloaded chunks they'll stop on their own. For the spawn chunks however... I can code you up a plugin after I get home. I'll tag myself so I don't forget Hutchmaster99