From 8b6cf4fe8ca475355df44a8076d75225b6e900e9 Mon Sep 17 00:00:00 2001 From: ItsMonkeyyy Date: Thu, 10 Dec 2015 19:05:42 -0800 Subject: [PATCH] Added a feature to enable or disable broadcasting tag changes --- src/main/java/com/massivecraft/factions/Conf.java | 1 + src/main/java/com/massivecraft/factions/cmd/CmdTag.java | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index 613e3c01..6fa68888 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -74,6 +74,7 @@ public class Conf { public static String truceChatFormat = ChatColor.DARK_PURPLE + "%s:" + ChatColor.WHITE + " %s"; public static boolean broadcastDescriptionChanges = false; + public static boolean broadcastTagChanges = false; public static double saveToFileEveryXMinutes = 30.0; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdTag.java b/src/main/java/com/massivecraft/factions/cmd/CmdTag.java index b5acd6ee..24886a99 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdTag.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdTag.java @@ -69,8 +69,12 @@ public class CmdTag extends FCommand { fplayer.msg(TL.COMMAND_TAG_FACTION, fme.describeTo(myFaction, true), myFaction.getTag(myFaction)); 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);