From 92475a6c43368556750c026c359020ce11229d9f Mon Sep 17 00:00:00 2001 From: filoghost Date: Sun, 21 Dec 2014 15:34:15 +0100 Subject: [PATCH] Move animation loaded successfully message to debug handler. --- .../holographicdisplays/placeholder/AnimationsRegister.java | 5 +++-- .../filoghost/holographicdisplays/util/DebugHandler.java | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/placeholder/AnimationsRegister.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/placeholder/AnimationsRegister.java index 86481491..341e1a28 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/placeholder/AnimationsRegister.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/placeholder/AnimationsRegister.java @@ -8,6 +8,7 @@ import org.bukkit.plugin.Plugin; import com.gmail.filoghost.holographicdisplays.HolographicDisplays; import com.gmail.filoghost.holographicdisplays.disk.StringConverter; +import com.gmail.filoghost.holographicdisplays.util.DebugHandler; import com.gmail.filoghost.holographicdisplays.util.FileUtils; import com.gmail.filoghost.holographicdisplays.util.Utils; @@ -66,7 +67,7 @@ public class AnimationsRegister { } animations.put(file.getName(), new Placeholder(HolographicDisplays.getInstance(), file.getName(), speed, new CyclicPlaceholderReplacer(lines.toArray(new String[lines.size()])))); - plugin.getLogger().info("Loaded animation '" + file.getName() + "', speed " + speed + "."); + DebugHandler.handleAnimationLoadSuccess(file.getName(), speed); } catch (Exception e) { e.printStackTrace(); @@ -82,6 +83,6 @@ public class AnimationsRegister { public static Placeholder getAnimation(String name) { return animations.get(name); - } + } } diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/util/DebugHandler.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/util/DebugHandler.java index 058a8951..6d62f1e9 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/util/DebugHandler.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/util/DebugHandler.java @@ -11,6 +11,12 @@ public class DebugHandler { HolographicDisplays.getInstance().getLogger().warning("[Debug] Coulnd't spawn entity for this hologram: " + parentPiece.getParent().toString()); } } + + public static void handleAnimationLoadSuccess(String name, double speed) { + if (Configuration.debug) { + HolographicDisplays.getInstance().getLogger().info("[Debug] Successfully loaded animation '" + name + "', speed = " + speed + "."); + } + }