@Override public void onDisable() { if (crashed) { crashed = false; return; } try { for (Player player : Bukkit.getOnlinePlayers()) { OnlineSessionCache.fetch(player).logout(player.getLocation()); } DatabaseTask.commit(); serverStatistics.pluginShutdown(); OnlineSessionCache.dumpSessions(); CachedData.stopAll(); Bukkit.getScheduler().cancelTasks(this); if (vaultHook != null) { vaultHook.onDisable(); } if (worldGuardHook != null) { worldGuardHook.onDisable(); } Database.close(); } catch (Throwable t) { Message.log(Level.SEVERE, t.getMessage()); if (LocalConfiguration.Debug.asBoolean()) t.printStackTrace(); } }