From e3ad9cf509a6a59d6a0d3a304b2b4eef8699f78c Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 30 Mar 2011 05:11:06 -0500 Subject: [PATCH] strip all color tags from faction-tagged chat messages before sending them to console/log, to de-cruft them --- .../mcteam/factions/listeners/FactionsPlayerListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java b/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java index fdf5162a..b08f0476 100644 --- a/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java +++ b/src/com/bukkit/mcteam/factions/listeners/FactionsPlayerListener.java @@ -3,6 +3,7 @@ package com.bukkit.mcteam.factions.listeners; import java.util.List; import java.util.logging.Logger; +import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; @@ -83,7 +84,7 @@ public class FactionsPlayerListener extends PlayerListener{ } // Write to the log... We will write the non colored message. - String nonColoredMsg = String.format(nonColoredMsgFormat, talkingPlayer.getDisplayName(), msg); + String nonColoredMsg = ChatColor.stripColor(String.format(nonColoredMsgFormat, talkingPlayer.getDisplayName(), msg)); Logger.getLogger("Minecraft").info(nonColoredMsg); } else { // No relation color.