Shutdown server

Discussion in 'Plugin Development' started by Forseth11, Sep 15, 2013.

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


    Hello, I host a server with beastnode and I made a plugin to kick players with a kick message then shutdown the server. I dispatched command: 'stop', but every time it stops it immediately starts back up.

    How do I stop it from starting back up.

    I have this code I am going to try. Will it work:
    1."Shutdown in progress.");
    3. this.plugin.getServer().savePlayers();
    4. Server server = this.plugin.getServer();
    6. server.savePlayers();
    8. for (World world : server.getWorlds()) {
    10. server.unloadWorld(world, true);
    11. }
    13. server.shutdown();

    I tested that code and it did not work.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 4, 2016
  2. Hmmmmmm try System.exit();
  3. Offline


  4. It could be that the serverbox that the server is running on has a program that makes it start right back up contact your hosting provider
  5. Offline


    vxwkillerjthewalrus A person from beastnode said that it is thinking it is a crash and starts again.
    How do I make it not look like a crash.

    Oh if the user on beastnode is the owner they can type: builtin:stop
    but if I dispatch that command it says it is unknown.
  6. You could ask them too disable that feature on your server

    Cause there seems too be no way too get around it
  7. Offline


    Dont dispatch the command, just output it to the console in a way so it is interpreted. (p.s, I don't know how to do this)
  8. Offline


  9. Offline


    he is already using that code inside the main post, the reason it failed was because his hosting provider thinks the server shutdown is a crash, and start it directly after it has shutdown
  10. Offline


  11. Offline

    Hoolean Retired Staff


    Ask BeastNode how to bypass it with a plugin :)
Thread Status:
Not open for further replies.

Share This Page