From 1c02b35193c164268d0c5b77c80722c33aaeef57 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 16 Oct 2011 08:25:56 -0500 Subject: [PATCH] Fix for "allianceChatFormat" not actually being used, updated default format for it --- src/com/massivecraft/factions/Conf.java | 4 ++-- .../factions/listeners/FactionsChatEarlyListener.java | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index 273a60db..3d6550ee 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -58,8 +58,8 @@ public class Conf public static boolean chatTagPadBefore = false; public static boolean chatTagPadAfter = true; public static String chatTagFormat = "%s"+ChatColor.WHITE; - public static String factionChatFormat = "%s"+ChatColor.WHITE+" %s"; - public static String allianceChatFormat = "%s"+ChatColor.WHITE+" %s"; + public static String factionChatFormat = "%s:"+ChatColor.WHITE+" %s"; + public static String allianceChatFormat = ChatColor.LIGHT_PURPLE+"%s:"+ChatColor.WHITE+" %s"; public static double autoLeaveAfterDaysOfInactivity = 14.0; diff --git a/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java b/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java index 36ab82e2..c2ce32ae 100644 --- a/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsChatEarlyListener.java @@ -73,21 +73,19 @@ public class FactionsChatEarlyListener extends PlayerListener { Faction myFaction = me.getFaction(); - String factionAndName = ChatColor.stripColor(me.getNameAndTag()); - String message = Conf.colorAlly+factionAndName+ChatColor.WHITE+" "+msg; + String message = String.format(Conf.allianceChatFormat, ChatColor.stripColor(me.getNameAndTag()), msg); //Send message to our own faction myFaction.sendMessage(message); + + //Send to all our allies for (FPlayer fplayer : FPlayers.i.getOnline()) { if(myFaction.getRelationTo(fplayer) == Relation.ALLY) - { - //Send to all our allies fplayer.sendMessage(message); - } } - P.p.log(Level.INFO, ChatColor.stripColor("AllianceChat "+me.getFaction().getTag()+": "+message)); + P.p.log(Level.INFO, ChatColor.stripColor("AllianceChat: "+message)); event.setCancelled(true); return;