use of me.botsko.prism.actionlibs.QueueDrain in project Prism-Bukkit by prism.
the class Prism method onDisable.
/**
* Shutdown.
*/
@Override
public void onDisable() {
Bukkit.getPluginManager().callEvent(EventHelper.createUnLoadEvent());
if (getConfig().getBoolean("prism.query.force-write-queue-on-shutdown")) {
final QueueDrain drainer = new QueueDrain(this);
drainer.forceDrainQueue();
}
if (!ApiHandler.disable()) {
log("Possible errors unhooking dependencies...");
}
Bukkit.getScheduler().cancelTasks(this);
// Close prismDataSource connections when plugin disables
if (prismDataSource != null) {
prismDataSource.dispose();
}
log("Closing plugin.");
for (Handler handler : prismLog.getHandlers()) {
handler.close();
}
super.onDisable();
}
Aggregations