Is there a way?

Discussion in 'Plugin Development' started by ewized, Jun 18, 2013.

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

    ewized

    Is there any way to listen to the
    Code:java
    1. Bukkit.shutdown();
    command as I want to create a list of tasks before the server shuts down?
     
  2. Offline

    Lolmewn

    Why not do it onDisable?
     
  3. Offline

    Alex5657

    This may be a little off-topic, but why are you using "code=lua" and not "code=java"?
     
  4. Offline

    chasechocolate

    Alex5657 it's:
    Code:
    [syntax=java]//Your code[/syntax]
     
    Minnymin3 likes this.
  5. Offline

    Alex5657

    Thats not my point. I am asking why he wants it to be lua syntax and not java.
     
  6. Offline

    chasechocolate

    My bad, I meant to tag the OP.
     
  7. Offline

    Minnymin3

    ewized
    onDisable() {
    //Yay now I can save anything I want to!
    }
     
  8. Offline

    ewized

    I could but is their a way to run the code before the players are kicked off and make sure its first to run?
     
  9. If you are using a specific plugin to shut the server down you could listen to something that is executed in the same method. If you have access to the plugin's source code you could run a console command that you can later listen to.
     
  10. Offline

    Lolmewn

    ewized Weren't players kicked after all plugins get disabled?
     
  11. Offline

    MrMag518

    I agree to a shutdown event, I've stumbled over some cases where it would have been quite usefull. onDisable is not always reliable as other plugins or an error may force the plugin to disable without shutting the server down.
     
  12. Offline

    lycano

    MrMag518 so you dont want to store data in memory to file/database when you plugin is beeing disabled? ;)
     
  13. Offline

    MrMag518

    When did I state that? I never specifically stated that it would be for that purpose.
     
  14. Offline

    ewized

    Yes but not if you use a server wrapper or spigot. So possibly get in some how an server shutdown listener.
     
Thread Status:
Not open for further replies.

Share This Page