From 3ec42144e768c1b44599116aba7f6ca0491b9121 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 10 Aug 2016 17:36:28 +1000 Subject: [PATCH] Fixes #229 --- .../main/java/com/boydti/fawe/bukkit/FaweBukkit.java | 11 ++++++++--- .../main/java/com/boydti/fawe/forge/FaweForge.java | 1 - .../main/java/com/boydti/fawe/forge/FaweForge.java | 1 - .../main/java/com/boydti/fawe/forge/FaweForge.java | 1 - .../main/java/com/boydti/fawe/forge/FaweForge.java | 1 - .../main/java/com/boydti/fawe/sponge/FaweSponge.java | 1 - 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bukkit0/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java b/bukkit0/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java index f9da7546..fcc18b7e 100644 --- a/bukkit0/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java +++ b/bukkit0/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java @@ -14,6 +14,7 @@ import com.boydti.fawe.bukkit.regions.TownyFeature; import com.boydti.fawe.bukkit.regions.Worldguard; import com.boydti.fawe.bukkit.v0.BukkitQueue_All; import com.boydti.fawe.bukkit.v0.ChunkListener; +import com.boydti.fawe.config.BBC; import com.boydti.fawe.config.Settings; import com.boydti.fawe.object.FaweCommand; import com.boydti.fawe.object.FawePlayer; @@ -32,7 +33,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.UUID; import org.bukkit.Bukkit; -import org.bukkit.ChatColor; +import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -85,7 +86,12 @@ public class FaweBukkit implements IFawe, Listener { @Override public void debug(final String s) { - Bukkit.getLogger().info(ChatColor.translateAlternateColorCodes('&', s)); + ConsoleCommandSender console = Bukkit.getConsoleSender(); + if (console != null) { + console.sendMessage(BBC.color(s)); + } else { + Bukkit.getLogger().info(BBC.color(s)); + } } @Override @@ -120,7 +126,6 @@ public class FaweBukkit implements IFawe, Listener { public void startMetrics() { Metrics metrics = new Metrics(plugin); metrics.start(); - debug("&6Metrics enabled."); } /** diff --git a/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java index 6c3d79b4..5e978a5d 100644 --- a/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -134,7 +134,6 @@ public class FaweForge implements IFawe { try { com.boydti.fawe.forge.ForgeMetrics metrics = new com.boydti.fawe.forge.ForgeMetrics("FastAsyncWorldEdit", "3.5.1"); metrics.start(); - debug("[FAWE] &6Metrics enabled."); } catch (Throwable e) { debug("[FAWE] &cFailed to load up metrics."); } diff --git a/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java index 41f185dd..7cd940bb 100644 --- a/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -131,7 +131,6 @@ public class FaweForge implements IFawe { try { ForgeMetrics metrics = new ForgeMetrics("FastAsyncWorldEdit", "3.5.1"); metrics.start(); - debug("[FAWE] &6Metrics enabled."); } catch (Throwable e) { debug("[FAWE] &cFailed to load up metrics."); } diff --git a/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java index 73b94627..70917f35 100644 --- a/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -134,7 +134,6 @@ public class FaweForge implements IFawe { try { com.boydti.fawe.forge.ForgeMetrics metrics = new com.boydti.fawe.forge.ForgeMetrics("FastAsyncWorldEdit", "3.5.1"); metrics.start(); - debug("[FAWE] &6Metrics enabled."); } catch (Throwable e) { debug("[FAWE] &cFailed to load up metrics."); } diff --git a/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java index 6c3d79b4..5e978a5d 100644 --- a/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -134,7 +134,6 @@ public class FaweForge implements IFawe { try { com.boydti.fawe.forge.ForgeMetrics metrics = new com.boydti.fawe.forge.ForgeMetrics("FastAsyncWorldEdit", "3.5.1"); metrics.start(); - debug("[FAWE] &6Metrics enabled."); } catch (Throwable e) { debug("[FAWE] &cFailed to load up metrics."); } diff --git a/sponge/src/main/java/com/boydti/fawe/sponge/FaweSponge.java b/sponge/src/main/java/com/boydti/fawe/sponge/FaweSponge.java index bfa5393e..a28bbb31 100644 --- a/sponge/src/main/java/com/boydti/fawe/sponge/FaweSponge.java +++ b/sponge/src/main/java/com/boydti/fawe/sponge/FaweSponge.java @@ -134,7 +134,6 @@ public class FaweSponge implements IFawe { try { SpongeMetrics metrics = new SpongeMetrics(Sponge.getGame(), Sponge.getPluginManager().fromInstance(plugin).get()); metrics.start(); - debug("[FAWE] &6Metrics enabled."); } catch (Throwable e) { debug("[FAWE] &cFailed to load up metrics."); }