add started value to bukkit plugin

This commit is contained in:
Luck 2016-10-22 00:05:33 +01:00 committed by GitHub
parent 5d955e77b6
commit 87f94f6b8f

View File

@ -86,6 +86,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
private WorldCalculator worldCalculator; private WorldCalculator worldCalculator;
private CalculatorFactory calculatorFactory; private CalculatorFactory calculatorFactory;
private BufferedRequest<Void> updateTaskBuffer; private BufferedRequest<Void> updateTaskBuffer;
private boolean started = false;
@Override @Override
public void onEnable() { public void onEnable() {
@ -193,11 +194,13 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
getServer().getOperators().forEach(o -> o.setOp(false)); getServer().getOperators().forEach(o -> o.setOp(false));
} }
started = true;
getLog().info("Successfully loaded."); getLog().info("Successfully loaded.");
} }
@Override @Override
public void onDisable() { public void onDisable() {
started = false;
getLog().info("Closing datastore..."); getLog().info("Closing datastore...");
datastore.shutdown().getOrDefault(null); datastore.shutdown().getOrDefault(null);