From 0aea7c6b9db5df4cf5393ba3f8fe93867af4ace0 Mon Sep 17 00:00:00 2001 From: Nick Porillo Date: Thu, 19 Feb 2015 10:49:38 -0500 Subject: [PATCH] Remove redundant messaging. Fixes #276 When informing faction members, if the command sender is part of the faction, do not send another message to him because he has already been informed. --- .../com/massivecraft/factions/cmd/CmdPermanentPower.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java index cfcbc31e..e5b0b604 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java @@ -38,10 +38,14 @@ public class CmdPermanentPower extends FCommand { change = TL.COMMAND_PERMANENTPOWER_GRANT.toString(); } + // Inform sender msg(TL.COMMAND_PERMANENTPOWER_SUCCESS, change, targetFaction.describeTo(fme)); - // Inform all players + // Inform all other players for (FPlayer fplayer : targetFaction.getFPlayersWhereOnline(true)) { + if(fplayer == fme) { + continue; + } String blame = (fme == null ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fplayer, true)); fplayer.msg(TL.COMMAND_PERMANENTPOWER_FACTION, blame, change); }