From 87f94f6b8fffb58b8c34acfad108216606e0fb4d Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 22 Oct 2016 00:05:33 +0100 Subject: [PATCH] add started value to bukkit plugin --- .../main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java index d9922ea5..774a645d 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java @@ -86,6 +86,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { private WorldCalculator worldCalculator; private CalculatorFactory calculatorFactory; private BufferedRequest updateTaskBuffer; + private boolean started = false; @Override public void onEnable() { @@ -193,11 +194,13 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { getServer().getOperators().forEach(o -> o.setOp(false)); } + started = true; getLog().info("Successfully loaded."); } @Override public void onDisable() { + started = false; getLog().info("Closing datastore..."); datastore.shutdown().getOrDefault(null);