Added a feature to enable or disable broadcasting tag changes

This commit is contained in:
ItsMonkeyyy 2015-12-10 19:05:42 -08:00
parent 1cf2158021
commit 8b6cf4fe8c
2 changed files with 7 additions and 2 deletions

View File

@ -74,6 +74,7 @@ public class Conf {
public static String truceChatFormat = ChatColor.DARK_PURPLE + "%s:" + ChatColor.WHITE + " %s"; public static String truceChatFormat = ChatColor.DARK_PURPLE + "%s:" + ChatColor.WHITE + " %s";
public static boolean broadcastDescriptionChanges = false; public static boolean broadcastDescriptionChanges = false;
public static boolean broadcastTagChanges = false;
public static double saveToFileEveryXMinutes = 30.0; public static double saveToFileEveryXMinutes = 30.0;

View File

@ -69,8 +69,12 @@ public class CmdTag extends FCommand {
fplayer.msg(TL.COMMAND_TAG_FACTION, fme.describeTo(myFaction, true), myFaction.getTag(myFaction)); fplayer.msg(TL.COMMAND_TAG_FACTION, fme.describeTo(myFaction, true), myFaction.getTag(myFaction));
continue; continue;
} }
Faction faction = fplayer.getFaction();
fplayer.msg(TL.COMMAND_TAG_CHANGED, fme.getColorTo(faction) + oldtag, myFaction.getTag(faction)); // Broadcast the tag change (if applicable)
if (Conf.broadcastTagChanges) {
Faction faction = fplayer.getFaction();
fplayer.msg(TL.COMMAND_TAG_CHANGED, fme.getColorTo(faction) + oldtag, myFaction.getTag(faction));
}
} }
FTeamWrapper.updatePrefixes(myFaction); FTeamWrapper.updatePrefixes(myFaction);