From f575ad6bc09089b42bef83c2b2d911738d4bd3d7 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 12 Oct 2011 21:54:38 +0200 Subject: [PATCH] Factions are not removed properly... this needs to be sorted out before release --- src/com/massivecraft/factions/FPlayer.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index ecdf0889..2bd56984 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -615,21 +615,29 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator if (myFaction.isNormal()) { - myFaction.msg("%s left your faction.", this.getNameAndRelevant(myFaction)); + //myFaction.msg("%s left your faction.", this.getNameAndRelevant(myFaction)); + for (FPlayer fplayer : myFaction.getFPlayersWhereOnline(true)) + { + fplayer.msg("%s left your faction.", this.describeTo(fplayer, true)); + } } - this.resetFactionData(); - if (myFaction.isNormal() && !perm && myFaction.getFPlayers().isEmpty()) { + // Transfer all money + Econ.transferMoney(this, myFaction, this, myFaction.getAccount().balance()); + // Remove this faction for (FPlayer fplayer : FPlayers.i.getOnline()) { - fplayer.msg("The faction %s was disbanded.", myFaction.getTag(fplayer)); + fplayer.msg("%s was disbanded.", myFaction.describeTo(fplayer, true)); } //Faction.delete(myFaction.getId()); + myFaction.detach(); } + + this.resetFactionData(); } public boolean attemptClaim(boolean notifyFailure)