Move animation loaded successfully message to debug handler.

This commit is contained in:
filoghost 2014-12-21 15:34:15 +01:00
parent dc698223b6
commit 92475a6c43
2 changed files with 9 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import org.bukkit.plugin.Plugin;
import com.gmail.filoghost.holographicdisplays.HolographicDisplays; import com.gmail.filoghost.holographicdisplays.HolographicDisplays;
import com.gmail.filoghost.holographicdisplays.disk.StringConverter; 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.FileUtils;
import com.gmail.filoghost.holographicdisplays.util.Utils; 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()])))); 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) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -82,6 +83,6 @@ public class AnimationsRegister {
public static Placeholder getAnimation(String name) { public static Placeholder getAnimation(String name) {
return animations.get(name); return animations.get(name);
} }
} }

View File

@ -11,6 +11,12 @@ public class DebugHandler {
HolographicDisplays.getInstance().getLogger().warning("[Debug] Coulnd't spawn entity for this hologram: " + parentPiece.getParent().toString()); 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 + ".");
}
}