From 1f6881177a4231d0ff2245b6b417fbe09a65a2d1 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Fri, 14 Mar 2014 15:22:13 -0500 Subject: [PATCH] Strip the colors from when unjailing and sending the message to console. --- .../com/graywolf336/jail/command/commands/UnJailCommand.java | 4 ++-- .../jail/command/commands/UnJailForceCommand.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/graywolf336/jail/command/commands/UnJailCommand.java b/src/main/java/com/graywolf336/jail/command/commands/UnJailCommand.java index 5fa7ed8..b6b089f 100644 --- a/src/main/java/com/graywolf336/jail/command/commands/UnJailCommand.java +++ b/src/main/java/com/graywolf336/jail/command/commands/UnJailCommand.java @@ -51,8 +51,8 @@ public class UnJailCommand implements Command { } } - if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILINGTOCONSOLE.getPath())) {//TODO: Fix this setting, as this is wrong - jm.getPlugin().getLogger().info(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() })); + if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILINGTOCONSOLE.getPath())) { + jm.getPlugin().getLogger().info(ChatColor.stripColor(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() }))); } }else { //The player is not currently jailed diff --git a/src/main/java/com/graywolf336/jail/command/commands/UnJailForceCommand.java b/src/main/java/com/graywolf336/jail/command/commands/UnJailForceCommand.java index 43cbac4..31d803c 100644 --- a/src/main/java/com/graywolf336/jail/command/commands/UnJailForceCommand.java +++ b/src/main/java/com/graywolf336/jail/command/commands/UnJailForceCommand.java @@ -1,5 +1,6 @@ package com.graywolf336.jail.command.commands; +import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import com.graywolf336.jail.JailManager; @@ -24,8 +25,8 @@ public class UnJailForceCommand implements Command { jm.getPlugin().getPrisonerManager().forceRelease(jm.getPrisoner(args[0])); sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.FORCEUNJAILED, args[0])); - if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILINGTOCONSOLE.getPath())) {//TODO: Fix this setting being used wrongly - jm.getPlugin().getLogger().info(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() })); + if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILINGTOCONSOLE.getPath())) { + jm.getPlugin().getLogger().info(ChatColor.stripColor(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() }))); } }else { //The player is not currently jailed