FANDOM


onDisable() is one of the methods used in the development of bukkit plugins. It is one of the two required methods, the other being onEnable(), that are found in all bukkit plugins.

onDisable() is the method used to tell the plugin what to do when the plugin is being stopped, whether this is via the /stop command or by a reload. In the following example the onDisable method tells the server log to display the message: [INFO][PluginName] has been stopped!.

Example:

@Override
public void onDisable() {
  Bukkit.getLogger().info("[PluginName] has been stopped!");
}