EmptyServerCommands - Automatic shutdown if server is empty


#1

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

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

v0.2 released!

The changelog can be found at the above linked page.


#3

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.


#4

Thanks for your suggestion!
This is very low priority for me because this could be achieved easily with a script plugin, like https://forums.spongepowered.org/t/desktop-multiscripts-1-0-1-beta-javascript-lua-python/16381 or https://forums.spongepowered.org/t/denizen2-scripting-engine/17275