Fix for "allianceChatFormat" not actually being used, updated default format for it

This commit is contained in:
Brettflan 2011-10-16 08:25:56 -05:00
parent f5450886f1
commit 1c02b35193
2 changed files with 6 additions and 8 deletions

View File

@ -58,8 +58,8 @@ public class Conf
public static boolean chatTagPadBefore = false; public static boolean chatTagPadBefore = false;
public static boolean chatTagPadAfter = true; public static boolean chatTagPadAfter = true;
public static String chatTagFormat = "%s"+ChatColor.WHITE; public static String chatTagFormat = "%s"+ChatColor.WHITE;
public static String factionChatFormat = "%s"+ChatColor.WHITE+" %s"; public static String factionChatFormat = "%s:"+ChatColor.WHITE+" %s";
public static String allianceChatFormat = "%s"+ChatColor.WHITE+" %s"; public static String allianceChatFormat = ChatColor.LIGHT_PURPLE+"%s:"+ChatColor.WHITE+" %s";
public static double autoLeaveAfterDaysOfInactivity = 14.0; public static double autoLeaveAfterDaysOfInactivity = 14.0;

View File

@ -73,21 +73,19 @@ public class FactionsChatEarlyListener extends PlayerListener
{ {
Faction myFaction = me.getFaction(); Faction myFaction = me.getFaction();
String factionAndName = ChatColor.stripColor(me.getNameAndTag()); String message = String.format(Conf.allianceChatFormat, ChatColor.stripColor(me.getNameAndTag()), msg);
String message = Conf.colorAlly+factionAndName+ChatColor.WHITE+" "+msg;
//Send message to our own faction //Send message to our own faction
myFaction.sendMessage(message); myFaction.sendMessage(message);
//Send to all our allies
for (FPlayer fplayer : FPlayers.i.getOnline()) for (FPlayer fplayer : FPlayers.i.getOnline())
{ {
if(myFaction.getRelationTo(fplayer) == Relation.ALLY) if(myFaction.getRelationTo(fplayer) == Relation.ALLY)
{
//Send to all our allies
fplayer.sendMessage(message); 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); event.setCancelled(true);
return; return;