From 8aa9e18be68cfaf0a7eb50a3739851a32b32d2a2 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Fri, 9 Nov 2012 18:22:41 -0600 Subject: [PATCH] New setting "broadcastDescriptionChanges" (default false) which can be enabled to have faction description changes broadcast to everyone on the server. Previously description changes were always broadcast. Also added witch and wither boss to monster list, missed that for last release. --- src/com/massivecraft/factions/Conf.java | 6 +++++- src/com/massivecraft/factions/cmd/CmdDescription.java | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index e4e330bc..d4b84a3e 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -68,7 +68,9 @@ public class Conf public static String chatTagFormat = "%s"+ChatColor.WHITE; public static String factionChatFormat = "%s:"+ChatColor.WHITE+" %s"; public static String allianceChatFormat = ChatColor.LIGHT_PURPLE+"%s:"+ChatColor.WHITE+" %s"; - + + public static boolean broadcastDescriptionChanges = false; + public static double autoLeaveAfterDaysOfInactivity = 10.0; public static double autoLeaveRoutineRunsEveryXMinutes = 5.0; public static boolean removePlayerDataWhenBanned = true; @@ -353,6 +355,8 @@ public class Conf safeZoneNerfedCreatureTypes.add(EntityType.SKELETON); safeZoneNerfedCreatureTypes.add(EntityType.SPIDER); safeZoneNerfedCreatureTypes.add(EntityType.SLIME); + safeZoneNerfedCreatureTypes.add(EntityType.WITCH); + safeZoneNerfedCreatureTypes.add(EntityType.WITHER); safeZoneNerfedCreatureTypes.add(EntityType.ZOMBIE); } diff --git a/src/com/massivecraft/factions/cmd/CmdDescription.java b/src/com/massivecraft/factions/cmd/CmdDescription.java index d9637ee8..57061e4b 100644 --- a/src/com/massivecraft/factions/cmd/CmdDescription.java +++ b/src/com/massivecraft/factions/cmd/CmdDescription.java @@ -34,6 +34,12 @@ public class CmdDescription extends FCommand myFaction.setDescription(TextUtil.implode(args, " ").replaceAll("(&([a-f0-9]))", "& $2")); // since "&" color tags seem to work even through plain old FPlayer.sendMessage() for some reason, we need to break those up + if ( ! Conf.broadcastDescriptionChanges) + { + fme.msg("You have changed your faction description to:", myFaction.describeTo(fme)); + return; + } + // Broadcast the description to everyone for (FPlayer fplayer : FPlayers.i.getOnline()) {