[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

    Cr@zy

    mccrestart.png
    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!

    Features
    - 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/)

    Commands
    /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

    Permission-nodes
    mccrestart.use

    config.yml example
    Code:
    config:
        # 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
    Code:
    messages:
        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
    Code:
    @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"
    Changelog:

    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

    vildaberper

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

    Cr@zy

    Yes of course ;)

    Edit: Release 1.0.1 published
     
  4. Offline

    Toni

    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

    Cr@zy

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

    Toni

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

    -Embarrassment-


    -------------

    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

    Cr@zy

    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

    Nidjo123

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

    Cr@zy

    You can write something like this :

    Code:
    @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

    LennardF1989

    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

    Cr@zy

    Hum i'm gonna check this
     
  12. Offline

    Taxick

    Thanks for the plugin
     
  13. Offline

    godgodgodgo

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

    Cr@zy

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

    Note for the next release ;)
     
  15. Offline

    stennett

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

    Nidjo123

    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

    Trollkemada

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

    d3p1

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

    Cr@zy

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

    thenewg2

    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

    RingOfStorms

    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

    Cr@zy

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

    parker_digg

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

    Cr@zy

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

    michaelc2528

    im trying to get this to work. i have set my run.bat file in my Bukkit folder the .bat is
    @ECHO OFF
    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

    derchris

    Needs OSX/Linux support
     
  27. Offline

    BorderKeeper

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

    Cr@zy

    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

    snizzle

    awesome plugin dude, ty for that.

    BUT...:)
    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

    Cr@zy

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

Share This Page