Fix for "allianceChatFormat" not actually being used, updated default format for it
This commit is contained in:
parent
f5450886f1
commit
1c02b35193
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user