From c81c1bfee3dc92c7549245b2864c0560cc000632 Mon Sep 17 00:00:00 2001 From: Alex Thomson Date: Wed, 12 Sep 2018 11:08:16 +1200 Subject: [PATCH] Fix debug messages --- .../lxgaming/sledgehammer/managers/CommandManager.java | 8 ++++---- .../sledgehammer/managers/IntegrationManager.java | 2 +- .../mixin/forge/common/MixinForgeHooks_Harvest.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/github/lxgaming/sledgehammer/managers/CommandManager.java b/src/main/java/io/github/lxgaming/sledgehammer/managers/CommandManager.java index 757e1d6..065e430 100644 --- a/src/main/java/io/github/lxgaming/sledgehammer/managers/CommandManager.java +++ b/src/main/java/io/github/lxgaming/sledgehammer/managers/CommandManager.java @@ -52,7 +52,7 @@ public static CommandResult process(AbstractCommand abstractCommand, CommandSour return CommandResult.empty(); } - Sledgehammer.getInstance().getLogger().debug("Processing {} for {}", command.get().getPrimaryAlias().orElse("Unknown"), commandSource.getName()); + Sledgehammer.getInstance().debugMessage("Processing {} for {}", command.get().getPrimaryAlias().orElse("Unknown"), commandSource.getName()); return command.get().execute(commandSource, arguments.get()); } @@ -71,7 +71,7 @@ public static boolean registerCommand(Class commandCl getCommands().add(command.get()); Sponge.getCommandManager().register(Sledgehammer.getInstance().getPluginContainer(), command.get(), command.get().getAliases().toArray(new String[0])); - Sledgehammer.getInstance().getLogger().debug("{} registered", commandClass.getSimpleName()); + Sledgehammer.getInstance().debugMessage("{} registered", commandClass.getSimpleName()); return true; } @@ -82,7 +82,7 @@ public static boolean registerAlias(AbstractCommand command, String alias) { } command.getAliases().add(alias); - Sledgehammer.getInstance().getLogger().debug("{} registered for {}", alias, command.getClass().getSimpleName()); + Sledgehammer.getInstance().debugMessage("{} registered for {}", alias, command.getClass().getSimpleName()); return true; } @@ -105,7 +105,7 @@ public static boolean registerCommand(AbstractCommand parentCommand, Class i return false; } - Sledgehammer.getInstance().getLogger().debug("{} registered", integrationClass.getSimpleName()); + Sledgehammer.getInstance().debugMessage("{} registered", integrationClass.getSimpleName()); return true; } diff --git a/src/main/java/io/github/lxgaming/sledgehammer/mixin/forge/common/MixinForgeHooks_Harvest.java b/src/main/java/io/github/lxgaming/sledgehammer/mixin/forge/common/MixinForgeHooks_Harvest.java index 28dead0..74419e2 100644 --- a/src/main/java/io/github/lxgaming/sledgehammer/mixin/forge/common/MixinForgeHooks_Harvest.java +++ b/src/main/java/io/github/lxgaming/sledgehammer/mixin/forge/common/MixinForgeHooks_Harvest.java @@ -42,7 +42,7 @@ private static void onCanHarvestBlock(Block block, EntityPlayer entityPlayer, IB // Prevents ClassCastException caused by Sponge assuming the IBlockAccess is an instanceof IMixinWorld if (!PhaseTracker.getInstance().getCurrentPhaseData().state.isInteraction() && !(blockAccess instanceof World)) { callbackInfoReturnable.setReturnValue(false); - Sledgehammer.getInstance().getLogger().debug("Harvest denied at {}, {}, {}", blockPos.getX(), blockPos.getY(), blockPos.getZ()); + Sledgehammer.getInstance().debugMessage("Harvest denied at {}, {}, {}", blockPos.getX(), blockPos.getY(), blockPos.getZ()); } } } \ No newline at end of file