diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index 9f0beff64..0cdaf470d 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -156,10 +156,12 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter { */ @Override public void onDisable() { - controller.clearSessions(); - controller.getPlatformManager().unregister(server); - config.unload(); - server.unregisterCommands(); + if (controller != null) { + controller.clearSessions(); + controller.getPlatformManager().unregister(server); + config.unload(); + server.unregisterCommands(); + } this.getServer().getScheduler().cancelTasks(this); }