Merge pull request #77 from patrickfreed/1.6.x

LWC Chest Protection Integration

When a claimed territory is captured by another Faction, all LWC chests that are not occupied by members of the person who is claiming the territory's faction lose their protection.
This commit is contained in:
Brett Flannigan
2012-01-15 10:07:54 -08:00
6 changed files with 140 additions and 9 deletions

View File

@@ -10,8 +10,8 @@ import java.util.Map.Entry;
import java.util.TreeMap;
import org.bukkit.ChatColor;
import com.google.gson.reflect.TypeToken;
import com.massivecraft.factions.integration.LWCFeatures;
import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.util.AsciiCompass;
import com.massivecraft.factions.zcore.util.DiscUtil;
@@ -87,6 +87,10 @@ public class Board
Entry<FLocation, String> entry = iter.next();
if (entry.getValue().equals(factionId))
{
if(Conf.onUnclaimResetLwcLocks && LWCFeatures.getEnabled())
{
LWCFeatures.clearAllChests(entry.getKey());
}
iter.remove();
}
}
@@ -126,6 +130,10 @@ public class Board
Entry<FLocation, String> entry = iter.next();
if ( ! Factions.i.exists(entry.getValue()))
{
if(Conf.onUnclaimResetLwcLocks && LWCFeatures.getEnabled())
{
LWCFeatures.clearAllChests(entry.getKey());
}
P.p.log("Board cleaner removed "+entry.getValue()+" from "+entry.getKey());
iter.remove();
}