style(file): structure
This commit is contained in:
parent
1f58704488
commit
a72b67be06
1 changed files with 19 additions and 19 deletions
|
@ -60,25 +60,6 @@ public class NickoBukkit extends JavaPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (!dataStore.getStorage().isError()) {
|
||||
getLogger().info("Closing persistence...");
|
||||
dataStore.removeAllNames();
|
||||
dataStore.saveAll();
|
||||
if (!dataStore.getStorage().getProvider().close()) {
|
||||
getLogger().warning("Failed to close persistence!");
|
||||
}
|
||||
}
|
||||
|
||||
if (config.isBungeecordSupport()) {
|
||||
getServer().getMessenger().unregisterIncomingPluginChannel(this);
|
||||
getServer().getMessenger().unregisterOutgoingPluginChannel(this);
|
||||
}
|
||||
|
||||
getLogger().info("Nicko (Bukkit) has been disabled.");
|
||||
}
|
||||
|
||||
public void onUnitTestingStartup() {
|
||||
getLogger().info("Loading persistence...");
|
||||
dataStore = new PlayerDataStore(this);
|
||||
|
@ -147,6 +128,25 @@ public class NickoBukkit extends JavaPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (!dataStore.getStorage().isError()) {
|
||||
getLogger().info("Closing persistence...");
|
||||
dataStore.removeAllNames();
|
||||
dataStore.saveAll();
|
||||
if (!dataStore.getStorage().getProvider().close()) {
|
||||
getLogger().warning("Failed to close persistence!");
|
||||
}
|
||||
}
|
||||
|
||||
if (config.isBungeecordSupport()) {
|
||||
getServer().getMessenger().unregisterIncomingPluginChannel(this);
|
||||
getServer().getMessenger().unregisterOutgoingPluginChannel(this);
|
||||
}
|
||||
|
||||
getLogger().info("Nicko (Bukkit) has been disabled.");
|
||||
}
|
||||
|
||||
public static NickoBukkit getInstance() {
|
||||
return plugin;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue