NOTICE: This plugin is NOT affiliated with ASR by iJoshuaHD in ANY way. I am not iJoshuaHD, and RestartMe is not ASR. Please keep this in mind when using this plugin. Also, this plugin contains built-in scripts. They are only run when your start script is modified so that automatic restarts can take place.
- For PocketMine-MP:
- Alpha 1.4 API 1.10.0
RestartMe is a plugin that allows your server to be automatically restarted at set intervals. It also allows automatic restarting of your server if memory usage is overloaded(peak usage can be configured in config.yml). There are also configurable messages that you can change in config.yml. Besides those, you can choose to start/stop the timer, so you don't have to worry about the server restarting in the middle of something important.
Main command: restartme, rm
- add: Adds n seconds to the timer
- help: Shows all RestartMe commands
- memory: Shows memory usage information
- set: Sets the timer to n seconds
- start: Starts the timer
- stop: Stops the timer
- subtract: Subtracts n seconds from the timer
- time: Gets the remaining time until the server restarts
- restartme.command.restartme: op
- For Windows OS:
Use only one of the following, for minimum conflicts:
Change the contents of your start script(by default it's start.cmd) and copy and paste the following into it(make sure you delete all of the old code first):
Code:@echo off cd /d %~dp0 netstat -o -n -a | findstr 0.0.0.0:19132 > NUL if %ERRORLEVEL% equ 0 ( goto :loop ) else ( goto :StartPM ) :loop ping 127.0.0.1 -n 5 > NUL netstat -o -n -a | findstr 0.0:19132 > NUL if %ERRORLEVEL% equ 0 ( goto :loop ) else ( PING 127.0.0.1 -n 5 > NUL goto :StartPM ) :StartPM if exist bin\php\php.exe ( set PHP_BINARY=bin\php\php.exe ) else ( set PHP_BINARY=php ) if exist PocketMine-MP.phar ( set POCKETMINE_FILE=PocketMine-MP.phar ) else ( if exist src\pocketmine\PocketMine.php ( set POCKETMINE_FILE=src\pocketmine\PocketMine.php ) else ( echo "Couldn't find a valid PocketMine-MP installation" pause exit 1 ) ) if exist bin\php\php_wxwidgets.dll ( %PHP_BINARY% %POCKETMINE_FILE% --enable-gui %* ) else ( if exist bin\mintty.exe ( start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %* ) else ( %PHP_BINARY% -c bin\php %POCKETMINE_FILE% %* ) ) goto :loop- For Linux OS, Mac OS, or any other OS:WARNING: For advanced users only.
Find the following lines:
Once you've located that line, change the value to the filename of the plugin(by default it is RestartMe_v(versionString).phar), or if you are running this plugin from source, change it to plugins\(sourcePluginFolderName)\scripts\php\wrapper.php.Code:set POCKETMINE_FILE=PocketMine-MP.phar set POCKETMINE_FILE=src\pocketmine\Pocketmine.php
Simply open your start script(by default it's start.sh) and set DO_LOOP to "yes".
- Add more commands
- Fix any bugs if found
- Plugin Access:
- Data Saving
Make sure your server stays up all the time!