A plugin that automatically restarts the server after a crash(or abnormal shutdown)

I need a plugin that automatically restarts the server when the shutdown is not normal.
My server often displays resource exceptions and is turned off, but it doesn’t actually have any effect, and I want to fix this by restarting.

Why a plugin for this? If you’re running your server on linux just do it with a script and add it to your cron jobs.

Hello,

I personally use MMCReboot and MineStart. MineStart checks if the server is up every x seconds and then attempts to restart it if it fails to ping, however, I’m pretty sure you can only use it on a dedicated server. Not sure if their link still works, I’ve been using the same .jar for the last 4 years (Happy to send you it if you can’t find a working version).

Hope this helps,

Alice

I run my server locally so it’s ran by a bat file that is a service on my PC, so I don’t need to see the console.

In the bat file you can create a function

:startserver
echo Starting server
java -server -Xms%MIN_RAM% -Xmx%MAX_RAM% -XX:PermSize=%PERMGEN_SIZE% %JAVA_PARAMETERS% -jar %FORGEJAR% nogui

Then after that, put this code. It’ll run when the server stops.

echo If you want to completely stop the server process now, press Ctrl+C before the time is up!
for /l %%i in (5,-1,1) do (
    echo Restarting server in %%i
    choice /t 1 /d y > nul
)
goto :startserver

This will give you 5 seconds to pause and cancel the restart.