EmptyServerCommands - Automatic shutdown if server is empty

#EmptyServerCommands [API v5]

##Description
This plugin automatically executes the commands specified in the config when the server is empty for a specified amount of time.

##Download
##Source

##Config
Example config(default one generated by the plugin on first startup):

commands=["stop"]
# Duration in minutes the server has to be empty to execute the commands.
delay=20
# Max. amount of players that can be on the server and it is still marked as 'empty'.
trigger-player-count=0
# Whether it should be waited for at least one player to join before the plugin is activated.
wait-for-first-player=false

Thanks to @ryantheleach for some ideas and inspiration!

RandomByte

2 Likes

##v0.2 released!

The changelog can be found at the above linked page.

One feature I could suggest would be to be able to run another command when the server is empty and someone joined the server. It would be useful for plugins such as Dynmap where you could start rendering the map when there’s no players online, but stop once there are players on the server.

Thanks for your suggestion!
This is very low priority for me because this could be achieved easily with a script plugin, like 🖥 MultiScripts - [1.0.1-Beta] - [JavaScript, Lua, Python] or Denizen2 Scripting Engine