Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[DELETED] [MISC] AutoRestart Plugin v1.0-Restarts server every * minutes [Alpha_1.3.6]

Comments in 'Plugin Releases' started by 99leonchang, Sep 1, 2013.

Thread Status:
Not open for further replies.
  1. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    AutoRestart helps you automatically restart your server.
    It is made to be used with a loop in your start.sh or start.bat

    Features:
    • User set intervals between restarts
    • Messages to players before server restarts
    • Message to player when they join
    • Command for cmd to check time left before restart
    Commands:
    /restart - (Only allowed to be run by cmd)Displays basic information formatted in the likes below:
    ****************************************************
    %% SERVERNAME::Restart Info
    %% Currently Online: 0/20
    %% 30 minutes left until server restarts.
    ****************************************************

    Changelog:
    Code:
    1.0:
    -Initial Release
    -Compatible with Alpha 1.3.7
    Installation:
    • Drop the plugin into the plugins/ folder
    • Restart the server
    • A config.yml will be generated in plugins/AutoRestart/ where you can change the "minutes" to the interval between restarts(in minutes).
    • Edit the start.sh or start.bat to have a loop
    Example start.sh with a loop and a pause for you to enter CTRL+C if necessary:
    Code:
    #!/bin/bash
    DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    cd "$DIR"
    if [ -f ./php5/bin/php ]; then
    mkdir -m 0777 bin/
    mv ./php5/bin/php ./bin/php
    rm -r -f ./php5/
    fi
    while :
    do
    rm console.log
    sleep 5
    ./bin/php -d enable_dl=On PocketMine-MP.php [email protected]
    done
    read -p "Press [Enter] to continue..."
    exit
    Download:
    Download
    Github
    Last edited: Sep 1, 2013
  2. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Niceibeenaiting when my server crash does it restart server too when server crash?
    Can you make a Blodd pluginwjen somwone hit you the block under neath turn redwool?
    Its fine if you dont want.
    But if you decide to make it Thank you! :)
  3. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    Hey,
    Theoretically, the server should still automatically restart after the interval but I haven't tested with crashed yet.
    If you really want, I can make it, but I'm not sure what the purpose of a plugin like that would be...
    Regards,
    Leon
  4. aPickaxeCrafter
    Offline

    aPickaxeCrafter New Member

    Joined:
    Sep 1, 2013
    Posts:
    14
    Minecraft User:
    apickaxeCrafter
    This plugin helps me a lot bcuz when my pc started to lag the server is restarting and i dont have any problem! :D
  5. ZacHack
    Offline

    ZacHack Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    325
    Plugins:
    6
    Minecraft User:
    _ZacHack_
    Cool plugin man!
  6. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    Are you able to give an example of a start.cmd file for a restart loop for all the Windows users? If not, I can just try to figure it out.
  7. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Code:
    @echo off
    TITLE PocketMine-MP server software for Minecraft: Pocket Edition
    cd /d %~dp0
    :loop
    if exist bin\php\php.exe (
        if exist bin\mintty.exe (
            start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max bin\php\php.exe -d enable_dl=On PocketMine-MP.php --enable-ansi %*
        ) else (
            bin\php\php.exe -d enable_dl=On PocketMine-MP.php %*
        )
    ) else (
        if exist bin\mintty.exe (
            start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max php -d enable_dl=On PocketMine-MP.php --enable-ansi %*
        ) else (
            php -d enable_dl=On PocketMine-MP.php %*
        )
    )
    goto loop
    
  8. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    Lol thank you wies
  9. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    Thank you! This helps out a lot :)
  10. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    Ummm....the start.cmd with the restart code is messed up. Instead of starting the server once and then waiting for a /restart command, it instead starts up an infinite amount of servers until you stop it. It took a few crashes of my computer until I figured it out.
  11. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Sorry my fault,
    on windows it doesn't wait to extrude the next line before the php process ends.
    Last edited: Oct 10, 2013
  12. Slimicus
    Offline

    Slimicus New Member

    Joined:
    Oct 10, 2013
    Posts:
    1
    Minecraft User:
    Slimicus
    you need to add /wait to the start commands, and I put a : in the goto at the end as well, like this:

    Code:
    Echo off
    TITLE PocketMine-MP server software for Minecraft: Pocket Edition
    cd /d %~dp0
    :loop
    if exist bin\php\php.exe (
        if exist bin\mintty.exe (
            start /wait "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o CursorType=0 -o CursorBlinks=1 -h never -t "PocketMine-MP" -i bin/pocketmine.ico -w max bin\php\php.exe -d enable_dl=On PocketMine-MP.php --enable-ansi %*
        ) else (
            bin\php\php.exe -d enable_dl=On PocketMine-MP.php %*
        )
    ) else (
        if exist bin\mintty.exe (
            start /wait "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o CursorType=0 -o CursorBlinks=1 -h never -t "PocketMine-MP" -i bin/pocketmine.ico -w max php -d enable_dl=On PocketMine-MP.php --enable-ansi %*
        ) else (
            php -d enable_dl=On PocketMine-MP.php %*
        )
    )
    GOTO :loop
    I had to remove the "@" sign at the top, it was adding some extra code to the echo, so that needs to be put back in too..
  13. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
  14. ZacHack
    Offline

    ZacHack Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    325
    Plugins:
    6
    Minecraft User:
    _ZacHack_
    Haha look at the difference between windows and linux... LINUX RULES!!!!
    Code:
    Echo off
    TITLE PocketMine-MP server software for Minecraft: Pocket Edition
    cd /d %~dp0
    :loop
    if exist bin\php\php.exe (
        if exist bin\mintty.exe (
            start /wait "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o CursorType=0 -o CursorBlinks=1 -h never -t "PocketMine-MP" -i bin/pocketmine.ico -w max bin\php\php.exe -d enable_dl=On PocketMine-MP.php --enable-ansi %*
        ) else (
            bin\php\php.exe -d enable_dl=On PocketMine-MP.php %*
        )
    ) else (
        if exist bin\mintty.exe (
            start /wait "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o CursorType=0 -o CursorBlinks=1 -h never -t "PocketMine-MP" -i bin/pocketmine.ico -w max php -d enable_dl=On PocketMine-MP.php --enable-ansi %*
        ) else (
            php -d enable_dl=On PocketMine-MP.php %*
        )
    )
    GOTO :loop
    Code:
    sleep 1
    Haha
    Let It Snow! likes this.
  15. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    haha
  16. Let It Snow!
    Offline

    Let It Snow! Active Member

    Joined:
    Oct 30, 2013
    Posts:
    60
    Minecraft User:
    LetItSnow_
    Lol
  17. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    I know Linux is better....I just don't have a spare computer to use with Linux at the moment :/
  18. ZacHack
    Offline

    ZacHack Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    325
    Plugins:
    6
    Minecraft User:
    _ZacHack_
  19. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,196
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    sorry to bump but can you update this plugin the same as the auto restart start.sh because it doesnt work after the latest update. thanks :)
  20. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    @iJoshuaHD I may attempt to when I have time
    In the meantime, you can edit it yourself :D
Thread Status:
Not open for further replies.

Share This Page

Advertisement