mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
[Bukkit] Handle onDisable() better when onEnable() fails.
This commit is contained in:
parent
302d089d55
commit
d4dde8c4a6
@ -156,10 +156,12 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
|
if (controller != null) {
|
||||||
controller.clearSessions();
|
controller.clearSessions();
|
||||||
controller.getPlatformManager().unregister(server);
|
controller.getPlatformManager().unregister(server);
|
||||||
config.unload();
|
config.unload();
|
||||||
server.unregisterCommands();
|
server.unregisterCommands();
|
||||||
|
}
|
||||||
this.getServer().getScheduler().cancelTasks(this);
|
this.getServer().getScheduler().cancelTasks(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user