So this is a simple plugin that you can configure to auto-restart your server when it hits a specific ram/tps/mspt amount.
Everything is async so it won't lag the server!
Code (YAML):
check-every-seconds: 3
restart-at-gb: 30.5
# Checking current restart-at-tps: -1.0
# Checking last 5 seconds restart-at-mspt: -1.0
# Check last 10 seconds # -1.0 is to disable ^^^ restart-delay-seconds: 5
# {seconds} is a placeholder for the variable above ^^^ # Leave the messages clear ("") to send nothing restart-message: "&eRestarting the server in &c{seconds} &eseconds" permission-message: "&c{TYPE} reached its limit!"# Type {TYPE} for Memory/TPS/MSPT and {type} for memory/tps/mspt message-permission: "amr.msg"# The permission that the player need to get the message above ^^^ on-trigger-commands: -
"restart" restart-cancel-message: "&cRestart canceled!"
# Please don't change the value of the config version config-version: {version
}
/amr memory- will send you "{usedMemory} / {maxMemory}"
/amr tps - will send you the server tps in different times
/amr restart <time> - restart the server with delay
/amr cancel - cancel restart
its easy to use, simple and useful plugin, I hope you like it!
If you find any errors or bugs please let me know!