From a8ed55c2158249850cfba981206251c8c8fb4be2 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 15 Dec 2011 23:50:37 -0600 Subject: [PATCH] fix for Spout faction labels not updating for players who have /f map on --- .../listeners/FactionsPlayerListener.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 544c3687..d528312e 100644 --- a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -183,23 +183,22 @@ public class FactionsPlayerListener extends PlayerListener // Yes we did change coord (: me.setLastStoodAt(to); + + // Did we change "host"(faction)? + boolean changedFaction = (Board.getFactionAt(from) != Board.getFactionAt(to)); + + if (changedFaction && SpoutFeatures.updateTerritoryDisplay(me)) + changedFaction = false; if (me.isMapAutoUpdating()) { me.sendMessage(Board.getMap(me.getFaction(), to, player.getLocation().getYaw())); } - else + else if (changedFaction) { - // Did we change "host"(faction)? - Faction factionFrom = Board.getFactionAt(from); - Faction factionTo = Board.getFactionAt(to); - - if (factionFrom != factionTo) - { - me.sendFactionHereMessage(); - } + me.sendFactionHereMessage(); } - + if (me.getAutoClaimFor() != null) { me.attemptClaim(me.getAutoClaimFor(), player.getLocation(), true);