Server Auto Restarting

Discussion in 'Plugin Development' started by StylishZebra, Feb 9, 2014.

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

    StylishZebra

    I had a question regarding Multicraft. I have a custom mini-game plug-in that I will be running on a Shared Minecraft Hosting server, and I need the server to auto restart when the game is finished. I need to know if this is possible with Multicraft, and if it isn't, do you know of any other options? I was considering a VPS, but I realized I can use bungeecoord to connect multiple Minecraft servers. I talked to my network developer, and apparently we can call an event within the plug-in to stop the server, we just need an outside way to actually restart it. I know with Multicraft you can schedule automatic restarts, but is there a way to edit any configuration files? Such as the startup.sh (I believe that's the correct file you edit) or any way to possibly make this work. I'd appreciate it if you didn't respond with a generic yes or no answer, please give me details. Thanks in advance.
     
  2. Offline

    xTrollxDudex

  3. Offline

    xTigerRebornx

    StylishZebra You'd have to put in a ticket with your Shared Host about it, asking them if you are allowed to put in a script that automatically restarts the server and if they could help you with it
     
  4. Offline

    HungerCraftNL

    PHP:
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "restart");
     
  5. Offline

    StylishZebra

    I already have the plug-in made, I just need a way for the plug-in to tell the server to restart once a certain action has completed.
    They just replied to me, this is what they said:
    How does this work? Does this command tell Bukkit to restart the server?
     
  6. Offline

    Gater12

    StylishZebra There is no /restart for Bukkit AFAIK if I'm not missing something here. It is impossible for plugins to start the server, because it's off means the plugins aren't active. The only way is to change the BAT file parameters to have it loop.
     
  7. Offline

    HungerCraftNL

    Spigot contains the /restart command, that's another way to restart your server.
     
  8. Offline

    StylishZebra

    I'll have to use Spigot to be able to use BungeeCord, correct? What would the line of code be for the restart command, and how is it possible in Spigot and not Bukkit?
     
  9. Offline

    Gater12

    StylishZebra Simple. Spigot isn't Bukkit and it's just a fork of Bukkit. And this is why Spigot isn't supported here. BungeeCord is just a proxy to connect you to multiple servers upon your wishing.
     
  10. Offline

    HungerCraftNL

    I haven't scripted Spigot, for more information you can look at the wiki on the spigot site (http://www.spigotmc.org/wiki/index/). Maybe you'll found some answers there. The only 2 ways to use this is, or edit the batch file, or use spigot and add
    PHP:
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "restart");
    to your plugin.
     
  11. Offline

    StylishZebra

    Oh I see. So if I resorted to using Spigot, I'm assuming this command wouldn't be supported:
    PHP:
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "restart");
    If it's not supported, what does that actually do?
     
  12. Offline

    Gater12

    StylishZebra I meant, support for Spigot won't be supplied here (Rather it would be in the Spigot forums). That would execute just fine if you were to use Spigot.
     
  13. Offline

    StylishZebra

    I hate to talk about Spigot here, but just to be clear if that line of code was executed within a plug-in, it'd work? Why wouldn't Bukkit consider implementing this, if it does work?
     
Thread Status:
Not open for further replies.

Share This Page