How to check if the Server is Reloading? (not shoutdown)

Discussion in 'Plugin Development' started by Smerfa, May 3, 2014.

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

    Smerfa

    I need save some data to file for every logged player on reload, I don't need it after shoutdown, only for reload ;/
     
  2. Offline

    Seadragon91

  3. Offline

    Smerfa

    I need save data on reload o.o not do it?
     
  4. Offline

    ZekeMo

    in your class that extends the javaPlugin add this method

    Code:
    public void onDisable() {
        // save data
    }
    This method will run when the server is reloading.
     
  5. Offline

    Smerfa

    Meh... this is also run on shoutdown, so... that will not work....


    But ok... i just saving on disable on loading in onEnable but loading only if player is online.
    Not perfect... but must work...
     
  6. Offline

    ZekeMo

    Why do you need it to run only when it's reloading? Why don't you want to save the data concerning your players when your server is shutting down?
     
Thread Status:
Not open for further replies.

Share This Page