Strip the colors from when unjailing and sending the message to console.

This commit is contained in:
graywolf336 2014-03-14 15:22:13 -05:00
parent c478ef2544
commit 1f6881177a
2 changed files with 5 additions and 4 deletions

View File

@ -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 if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILINGTOCONSOLE.getPath())) {
jm.getPlugin().getLogger().info(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() })); jm.getPlugin().getLogger().info(ChatColor.stripColor(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() })));
} }
}else { }else {
//The player is not currently jailed //The player is not currently jailed

View File

@ -1,5 +1,6 @@
package com.graywolf336.jail.command.commands; package com.graywolf336.jail.command.commands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import com.graywolf336.jail.JailManager; import com.graywolf336.jail.JailManager;
@ -24,8 +25,8 @@ public class UnJailForceCommand implements Command {
jm.getPlugin().getPrisonerManager().forceRelease(jm.getPrisoner(args[0])); jm.getPlugin().getPrisonerManager().forceRelease(jm.getPrisoner(args[0]));
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.FORCEUNJAILED, 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 if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILINGTOCONSOLE.getPath())) {
jm.getPlugin().getLogger().info(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() })); jm.getPlugin().getLogger().info(ChatColor.stripColor(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() })));
} }
}else { }else {
//The player is not currently jailed //The player is not currently jailed