MMCReboot [2.3.0] - A server restart plugin

I found this script on Google but you need to have access from ssh to run this:

#!/bin/bash

{
  if ps aux | grep java | grep -v grep | awk '{print$2}' | grep -v -i SCREEN | grep $SERVICE > /dev/null | xargs sudo kill -9
  then echo "Tried to start but Minecraft was already running!"
   else java -Duser.timezone=America/Sao_Paulo -server -Xmx4500M -Xms4500M -jar forge-1.10.2-12.18.3.2202-universal.jar nogui
    sleep 5


    #Check to see if the service started successfully
    if ps aux | grep java | grep -v grep | awk '{print$2}' | grep -v -i SCREEN | grep $SERVICE > /dev/null | xargs sudo kill -9
    then echo "Minecraft is now running."
    else ./start.sh
        fi
      fi
}

Change to your forge jar and you timezone, if needed.

#Update v1.7

Fixes:

  • TPS Restart getting stuck in loop
  • TPS Restart being enabled prevented a normal restart from happening

Download

Releases

Source

Any way to restart from discord through Discord Bridge?

I don’t think it is possible at the moment, unless it has the ability to send commands now.

#Update v2.0.0

BREAKING CONFIG CHANGE(S)!! - Recommended config reset

Changes

  • timer.broadcast config now uses seconds instead of minutes
  • Config for autorestart timer now split into Fixed and Realtime
  • Delay for message that is displayed upon login if a vote is in progress has been lowered from 10 seconds to 3
  • /reboot start now uses choices for h/m/s

Added

  • Config option to change sound notification
  • Config option for when the first sound notification should play (Use one of the values from your timer.broadcast config list)
  • Realtime restart timer - Restart at specific times of the day (Server hosted location’s timezone)
  • Localization using customizable Messages.conf file

Fixes

  • Check online time before isRestarting when initiating a /reboot vote

Download

Releases

Source

#Update v2.0.1

Changes

  • Localisation is now located in the localisation folder - Allows for easy default translation addition
  • Localisation now uses pre-set default languages
  • Custom bstats piechart for restart type usage
  • Add missing messages to localisation

Download

Releases

Source

hi been using your plugin looks amazing having a couple of issues with it and wondered if you could be of assistance

  1. I am using Minecraft-hosting.pro and cant figure out how to start my server up after the restart
  2. the vote reboot doesn’t seem to work the vote happens but at the end, it says restarting and then does nothing

any help you could give would be great

  1. The restart is usually automatically handled by the panel but since in your case it is not. the only way to get it to do so is to use the automated tasks feature which is offered for an extra 4$ by your host i believe. Most panels that have this feature allow you to listen for if the server stops to then start it back up. which is great for when the server crash’s too.

  2. What version of the plugin are you currently using and if you could provide full details of the config file you are using, that would help me out alot for diagnosing this problem.

MMCReboot-2.0.1-API-5.1-6.X is the version installed in my server

and autorestart { # Values: Fixed, Realtime or None. The value choses here repr - Pastebin.com is my configs
and im not sure how to do that on my host but ill open a ticket for assistance from them

update I have my server restarting properly by adding a blank restart.txt to my root directory of my server

but the vote restart is still not working

I’m not currently experiencing this issue, or at least cannot replicate it for myself.

Can you explain the events that happen after typing /reboot vote up until there is nothing more happening

Reboot not working. Please fix for spongeforge-1.10.2-5.2.0 latest version.

I cannot replicate this on my test setup. If this keeps happening please submit a report here: https://github.com/ModdedMinecraft/MMCReboot-Sponge/issues

with the Sponge version used, Any FML-Server-Log files for the time relating to the incident and your current config file setup.

does it work with api 6.1.0 on mc 1.11.2? if doesn’t, will you do? thanks

There is no compilation errors so the current build should still work with 6.1.0 perfectly fine.

Do you think you could replace the default “Server closed” message with the custom reason for a reboot?

im using Nucleus for this cause all MMCReboot does is a /stop

and with Nucleus u have this:

kick-on-stop {
#If true, Nucleus will kick all users just prior to the server stopping.
enabled=true
#The message to display to players when restarting the server. Overridden when using the /stop [reason] command.
message=“Server is restarting”
}

I gave myself all the following permissions and I cant seem to start a reboot with /reboot vote or /reboot now. I can do it in the server console command but not in game. I even gave my group the permissions “I use Lucky Perms”. Any idea whats up? The error I get is “You do not have permission to use this!”

mmcreboot.reboot.vote - start a vote to restart the server
mmcreboot.reboot.now - restart the server immediately
mmcreboot.reboot.start - set a timer to restart
mmcreboot.reboot.time - check the time until a restart
mmcreboot.reboot.cancel - cancel any restart/vote in progress
mmcreboot.reboot.bypass.vote - bypass the initial checks for /reboot vote
mmcreboot.reboot.toggle.vote - in-game toggle for enabling and disabling of the voting system

Could you provide the sponge version you are using?

Also check your own permission node using

/luckperms user {user} permission check mmcreboot.reboot.vote

and the others if need be. If you have the permission then it should return true. If it is false then it is not a fault of the plugin and most likely due to an error somewhere else like user error, Luckperms or Sponge

Thank you for the reply,

The version of Sponge I am using is:
Sponge Forge 1.12.2-2655-7.1.0-BETA-3080

I am willing to change to another version if need be.

I ran the command and it returned:
user has permission mmcreboot.reboot.vote set to undefined in context global

Is there a config file named global I need to ajust? I looked around and found the one in the sponge folder but id didint have anything about mmcreboot in there.