Merge branch 'master' of github.com:MassiveCraft/Factions

This commit is contained in:
Brettflan
2012-01-28 12:02:39 -06:00
2 changed files with 9 additions and 4 deletions

View File

@@ -140,9 +140,14 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
public final void resetFactionData(boolean doSpotUpdate)
{
Faction currentFaction = this.getFaction();
if (currentFaction != null)
currentFaction.removeFPlayer(this);
if (this.factionId != null && Factions.i.exists(this.factionId)) // Avoid infinite loop! TODO: I think that this is needed is a sign we need to refactor.
{
Faction currentFaction = this.getFaction();
if (currentFaction != null)
{
currentFaction.removeFPlayer(this);
}
}
this.factionId = "0"; // The default neutral faction
this.chatMode = ChatMode.PUBLIC;