Solved Need for onDisable()?

Discussion in 'Plugin Development' started by godlypowerr, Mar 19, 2017.

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


    I've looked for a while into disabling a plugin, and it doesn't look like it's possible (from the Minecraft console) e.g. some way of doing "/disable pluginName". Sorry if there is a way, I'm new here, but since I'm assuming there isn't a way, is there a need to have the onDisable() method in your main class? It looks like the only time it gets disabled is on server shutdown, and if the server shuts down, so does everything else, so my plugin will be shut down either way, correct?

    Sorry if that's dumb...
  2. Offline


    There is no need to explicitly write out the method, because it is already included in the JavaPlugin class. When you make one, you are just overriding the one that is already in JavaPlugin. The only reason you would need one is if you wanted your plugin to do something before it was disabled.
  3. Online

    timtower Administrator Administrator Moderator

    @godlypowerr or at a reload or a plugin disables it.
    But that does not require an onDisable, onEnable is not required either.
  4. Offline


    @timtower Ooo ok, at reload time, I guess might make a different, so thank you. Looks like I'm keeping it :D
Thread Status:
Not open for further replies.

Share This Page