From 45b4f32d782a5dc8da8dcdfa2db8a64b2e027290 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Sun, 17 Jun 2018 14:48:53 +0200 Subject: [PATCH] Print more detailed info about addons loading in console --- .../us/tastybento/bskyblock/managers/AddonsManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/us/tastybento/bskyblock/managers/AddonsManager.java b/src/main/java/us/tastybento/bskyblock/managers/AddonsManager.java index b95e84104..0c119f4ec 100644 --- a/src/main/java/us/tastybento/bskyblock/managers/AddonsManager.java +++ b/src/main/java/us/tastybento/bskyblock/managers/AddonsManager.java @@ -54,19 +54,21 @@ public class AddonsManager { } Arrays.stream(Objects.requireNonNull(f.listFiles())).filter(x -> !x.isDirectory() && x.getName().endsWith(".jar")).forEach(this::loadAddon); addons.forEach(Addon::onLoad); + plugin.log("Loaded " + addons.size() + " addons."); } /** * Enables all the addons */ public void enableAddons() { + plugin.log("Enabling addons..."); addons.forEach(addon -> { addon.onEnable(); Bukkit.getPluginManager().callEvent(AddonEvent.builder().addon(addon).reason(AddonEvent.Reason.ENABLE).build()); addon.setEnabled(true); plugin.log("Enabling " + addon.getDescription().getName() + "..."); }); - + plugin.log("Addons successfully enabled."); } /** @@ -134,6 +136,7 @@ public class AddonsManager { * Disable all the enabled addons */ public void disableAddons() { + plugin.log("Disabling addons..."); // Unload addons addons.forEach(addon -> { addon.onDisable(); @@ -148,6 +151,7 @@ public class AddonsManager { // Ignore } }); + plugin.log("Addons successfully disabled."); } public List getAddons() {