Tells how much time it took to fully load BSkyBlock

This commit is contained in:
Florian CUNY 2018-07-03 11:20:52 +02:00
parent 0cb21d8468
commit 9f3e4e22dc
2 changed files with 5 additions and 3 deletions

View File

@ -63,6 +63,9 @@ public class BSkyBlock extends JavaPlugin {
@Override
public void onEnable(){
// Store the current millis time so we can tell how many ms it took for BSB to fully load.
final long startMillis = System.currentTimeMillis();
// Save the default config from config.yml
saveDefaultConfig();
setInstance(this);
@ -116,7 +119,6 @@ public class BSkyBlock extends JavaPlugin {
// Enable addons
addonsManager.enableAddons();
getServer().getScheduler().runTask(instance, () -> {
// Load Flags
flagsManager = new FlagsManager(instance);
@ -128,7 +130,6 @@ public class BSkyBlock extends JavaPlugin {
islandsManager.load();
// Save islands & players data asynchronously every X minutes
instance.getServer().getScheduler().runTaskTimer(instance, () -> {
playersManager.save(true);
islandsManager.save(true);
@ -136,6 +137,7 @@ public class BSkyBlock extends JavaPlugin {
instance.log("#############################################");
instance.log(instance.getDescription().getFullName() + " has been fully enabled.");
instance.log("It took: " + (System.currentTimeMillis() - startMillis + "ms"));
instance.log("Thanks for using our plugin !");
instance.log("- Tastybento and Poslovitch, 2017-2018");
instance.log("#############################################");

View File

@ -31,8 +31,8 @@ public class SchemsManager {
if (!schems.exists() && !schems.mkdirs()) {
plugin.logError("Could not make schems folder!");
return;
}
Optional<Addon> addon = plugin.getIWM().getAddon(world);
if (addon.isPresent()) {
addon.get().saveResource("schems/" + name + ".schem", false);