From b97eaf175ece09ebbe256c95aeea87ddd6e7853f Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 24 Jul 2011 17:38:58 -0500 Subject: [PATCH] When adding relational colored faction tags to chat, Factions now pays better attention to whether the recipient list has been altered by another plugin --- src/com/massivecraft/factions/commands/FCommandHelp.java | 2 +- .../massivecraft/factions/listeners/FactionsPlayerListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/commands/FCommandHelp.java b/src/com/massivecraft/factions/commands/FCommandHelp.java index 8a0633fd..6894cb7b 100644 --- a/src/com/massivecraft/factions/commands/FCommandHelp.java +++ b/src/com/massivecraft/factions/commands/FCommandHelp.java @@ -117,7 +117,7 @@ public class FCommandHelp extends FBaseCommand { pageLines = new ArrayList(); pageLines.add("Only faction members can build and destroy in their own"); pageLines.add("territory. Usage of the following items is also restricted:"); - pageLines.add("Door, Chest, Furnace and Dispenser."); + pageLines.add("Door, Chest, Furnace, Dispenser, Diode."); pageLines.add(""); pageLines.add("Make sure to put pressure plates in front of doors for your"); pageLines.add("guest visitors. Otherwise they can't get through. You can"); diff --git a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 734f9615..1e5b45c8 100644 --- a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -91,7 +91,7 @@ public class FactionsPlayerListener extends PlayerListener{ // Why? Because the relations will differ. event.setCancelled(true); - for (Player listeningPlayer : Factions.instance.getServer().getOnlinePlayers()) { + for (Player listeningPlayer : event.getRecipients()) { FPlayer you = FPlayer.get(listeningPlayer); String yourFormat = formatStart + me.getChatTag(you).trim() + formatEnd; listeningPlayer.sendMessage(String.format(yourFormat, talkingPlayer.getDisplayName(), msg));