diff --git a/src/org/mcteam/factions/Faction.java b/src/org/mcteam/factions/Faction.java index 36f119f9..472c45ce 100644 --- a/src/org/mcteam/factions/Faction.java +++ b/src/org/mcteam/factions/Faction.java @@ -95,12 +95,23 @@ public class Faction { } public Location getHome() { + confirmValidHome(); return home; } public boolean hasHome() { + confirmValidHome(); return this.home != null; } + + public void confirmValidHome() { + if (!Conf.homesMustBeInClaimedTerritory || Board.getFactionAt(new FLocation(this.home)) == this) { + return; + } + + sendMessage("Your faction home has been un-set since it is no longer in your territory."); + this.home = null; + } // ------------------------------- // Understand the types