How To Check if Bukkit is stopping or reloading.

Discussion in 'Plugin Development' started by meguy26, Jun 29, 2015.

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

    meguy26

    So, I was wondering if there is an easy way, in the onDisable() method, to check if it is being called as result of a /stop or /reload. I know I could listen to the command events and assign a boolean depending on /start or /reload, but that seems like a "lot" of work for something that seems so simple.
     
  2. onDisable() get's called 99% because of /stop or /reload. The 1% is from a custom plugin that is able to enable/disable other plugins
     
  3. @FisheyLP By the sounds of it he's trying to tell why it's being called - i.e. is it because of a shut down, or because of a reload? Not whether it's a reload/shut down or plugin.


    @meguy26 Well, you could get the current stack trace onDisable() and then loop through the elements, checking for the reload and/or setEnabled() methods. That's the only way really.
     
  4. Offline

    meguy26

    Yep thats my questions

    No idea how to do that, i'll just listne to command events instead.
     
Thread Status:
Not open for further replies.

Share This Page