[INACTIVE][ADMN] MCCRestart v1.2.5 - Scheduled and delayed server restarts [677]

Discussion in 'Inactive/Unsupported Plugins' started by Cr@zy, Apr 9, 2011.

  1. Offline


    Version: v1.2.5​

    MCCRestart is a tool to schedule server restarts. It saves player and chunk data before each restarts at specified times or delays and gives a warning message to each players before restart. You can also give a reason for the restart. (see commands section)
    If a problem occurs during restarts, post the mccrestart.log

    In your config.yml file you can specify for the launch parameter a batch file.
    Eg. 'run.bat' (you can download the run.zip join to this post)

    If the Permissions plugin is not detected, only OPs can use restart and mccrestart commands.

    [​IMG]MCCRestart v1.2.5
    Requirements: Java6+, Bukkit 677
    Optional: Permissions 2.0/2.7+

    For versions before 1.2.5 check YAML files!

    - Restarts server at specified time (24-hour format)
    - Or at delayed time (24-hour format)
    - Add a manual restart with a delay and/or a reason for.
    - Cancel a manual restart.
    - Warning message to players before restart.
    - Saves player and chunk data.
    - Multi-world compatible.
    - Add delay between stop and restart server.
    - Use config.yml and messages.yml to configure the plugin.
    - Don't modify the paramaters {n} in each YAML files.
    - Automatically creates config.yml and messages.yml in the plugin folder.

    OS compatibility
    Windows 7, Vista, XP... (x86 and x64 editions)
    OSX/Linux (work on it...)
    MacOS (work on it...)

    Any problems?
    Please submit a complete bug report with :
    - OS where the server is deployed.
    - Bukkit version.
    - Submit the mccrestart.log if there. (use http://pastebin.com/)
    - Submit your server.log. (use http://pastebin.com/)

    /mccrestart help - List MCCRestart commands
    /mccrestart reload - Reload the plugin configuration
    /mccrestart next - Give the next time to restart
    /restart - Restart the server immediately
    /restart 59:59 - Restart after a delay (minutes:seconds)
    /restart 59:59 reason - Restart after a delay with a reason
    /restart cancel - Cancel a manual restart


    config.yml example
        # Active/deactivate plugin
        enable: 'true'
        # Active/deactivate restart at times or delay (true or false)
        autorestart: 'true'
        # Args to launch the server (must be placed in your root server folder)
        launcher: 'java -Xms512M -Xmx512M -jar craftbukkit.jar'
        # If you want to launch a batch file (must be placed in your root server folder)
        #launcher: 'run.bat'
        # How many seconds before restart to show warning message to players. Separate seconds with a comma.
        warn: '30,10'
        # Scheduled times when the server is restarting. Use 24-hour time and separate times with a comma.
        times: '12:00:00,23:00:00'
        # Delay time between each restart. Use 24-hour time.
        delay: '02:00:00'
        # Choose type of restart (times or delay)
        type: 'delay'
        # Delay between stop and restart server if you have a lot of plugins (use minutes:secondes)
        stoptime: '00:10'
    messages.yml example
        warn: 'The server is being restarted...'
        warnTime: 'The server restarts in {0} seconds...'
        restart: 'The server is restarting...'
        disabled: 'MCCRestart is disabled'
        reload: 'MCCRestart reloaded'
        next: 'Next restart scheduled at {0}'
        reason: 'Reason: {0}'
        cancel: 'Manual restart cancelled'
        norestart: 'No restart is scheduled'
    run.bat example
    @echo off
    set memory=512
    if /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms%memory%M -Xmx%memory%M -jar "%~dp0craftbukkit.jar"
    if /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xms%memory%M -Xmx%memory%M -jar "%~dp0craftbukkit.jar"

    Version 1.2.5 [670]
    - Delay between stop and restart server if you have a lot of plugins (see config.yml)
    - More logs during restart
    - Adding multi-world compatibility.
    - Bug add a reason for a manual restart.

    Version 1.2.4 [670]
    - Add possibility to active deactivatee the plugin (config.yml)
    - Delete on|off command (use enable in config.yml and reload command)
    - Bug when autorestart false for manual restarts.
    - Increase thread latency.
    - Fix warn displays.
    - Fix console messages.

    Version 1.2.2 [670]
    - 'null' folder when generates configuration files.
    - Add manual restart with delay and reason.

    Version 1.2.0 [670]
    - Add delay time.
    - Possibility to choose delay or specified times.
    - Add next config command.

    Version 1.1.5 [670]
    - Bug to disable the plugin.
    - Add reload config command.

    Version 1.1.0 [670]
    - Update for bukkit 670.
    - Plugin optimised and cleaned.
    - Method changed to perform restart.

    Version 1.0.1 [612]
    - English language by default.

    Version 1.0.0 [612]
    - Release

    This is my first plugin : suggestions and feedback appreciated :)
    unenergizer likes this.
  2. Offline


    Many thanks for this plugin, but you should make the default strings to english.
    Good that its possible to change them. :)
  3. Offline


    Yes of course ;)

    Edit: Release 1.0.1 published
  4. Offline


    Great job! Just a question though, you said it doesn't detect the permissions plugin; you should make it so it's compatible with GroupManager or Permissions!
  5. Offline


    Permissions is enabled for this plugin but if not only OPs can manually restart the server ;)
  6. Offline


    Oh, I'm sorry. I read wrong haha. Was about to edit my post but then you posted :p



    Hey but a question, I saw another plugin like this, but instead of putting this on the plugins folder you were suppose to put it in the root folder. Should I just put it in the plugins folder?
  7. Offline


    Ahahah :p

    Version 1.1.0
    - Update for bukkit 670.
    - Plugin optimised and cleaned.
    - Method changed to perform restart.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  8. Offline


    Waht do I have to write in run.batch to restart the server?
  9. Offline


    You can write something like this :

    @echo off
    set memory=512
    if /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms%memory%M -Xmx%memory%M -jar "%~dp0craftbukkit.jar"
    if /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xms%memory%M -Xmx%memory%M -jar "%~dp0craftbukkit.jar"
  10. Offline


    There is a bug in the active part of the config, no matter if it's true or false, the server will still reboot. I am only interested in the /restart function and therefor want to disable the automatic reboot scheduling, but just like the AutoStop plugin, it doesn't work.
  11. Offline


    Hum i'm gonna check this
  12. Offline


    Thanks for the plugin
  13. Offline


    Can you change how long it takes to start again? Mine is saying that the server is still running :/
  14. Offline


    Release 1.1.5 : Fix this problem and others improvements...

    Note for the next release ;)
  15. Offline


    Does the option to run from batch files also support other file types, specifically .sh?
  16. Offline


    Oh, it's too complicated for me. :D Great plugin however.

    I'm running server from SSH and it's linux. I'm using GNU Screen for sessions and when I stop server, screen automatically terminates and I think that plugin won't work in that way.
  17. Offline


    Can you make it work for linux? it would be great
  18. Offline


    I'd love this too, my host requires that the server is started using their .sh script.
  19. Offline


    Ok i gonna make an Unix version for the next release ;)
    Trollkemada and d3p1 like this.
  20. Offline


    Please add support for screen. I use it on my Debian server and would love to use this plugin, unfortunately, it doesn't allow me to use screens to remotely administer my server.
  21. Offline


    I have my server running on mac and honestly can't get it to work.. it works perfectly on my windows computer. But basically I wan't the launching in the run.bat spot to be different. Because Mac cannot use the batch files you have to us ea terminal -java. When I try to replace the name to be run. command.. it does not want to work.

    Is there support for the .command files? or do you have to implement that.
  22. Offline


    I have to implement it. Next release ;)
  23. Offline


    This isn't working for me. startserver.bat for my launcher. It doesn't do anything at all. Not sure why.
  24. Offline


    Please submit your batch. It seems there is a problem...
  25. Offline


    im trying to get this to work. i have set my run.bat file in my Bukkit folder the .bat is
    SET BINDIR=%~dp0
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx1G -jar "%BINDIR%\craftbukkit-0.0.1-snapshot.jar"
    when i try to use /restart on my server it says server will restart in 4, then closes the cmd.exe and opens another one but it closes instantly, I Cant Get this to work ;( it would be appreciated if someone who has this working could help me

    Edit: Dont worry i used hypercam to recored the problem and i had to rename the bukkit-0.0.1_SNAPSHOT.jar to Bukkit.jar and it works fine.
    the only thing i wanted this for was whilst im installing pluggins someone could restart the server this is gunna help allot avoiding hafting to do team viewer ;)
  26. Offline


    Needs OSX/Linux support
  27. Offline


    Not all of us use windows as OS. Primairly ofr RAM usage. Can you write an linux support?
  28. Offline


    Soon ;)

    New release!

    For the next release, I focus on OS compatibility (OSX/Linux/MacOS).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  29. Offline


    awesome plugin dude, ty for that.

    would be gr8 if u could add following things:
    1. possibility to restart like "delayedstop" [/restart 60s] will restart the server in 60 sec
    2. possibility to add a reason for the restart, like "server is restarting in x sec (reason:updates)"

    Thats the Plugin i named : DelayedStop

    Bugreport: it sometimes show me twice the message "server is restarting in 3sec"
  30. Offline


    You should use Runtime process, Timer are depreciated for this kind of plugin :)
    But i'm gonna add your suggestion ;)

Share This Page