// FPerm
if (!FPerm.TERRITORY.has(usender, faction, true)) return;
// Apply
BoardColl boardColl = BoardColls.get().get(faction);
Set<PS> chunks = boardColl.getChunks(faction);
int countTotal = chunks.size();
int countSuccess = 0;
int countFail = 0;
for (PS chunk : chunks)
{
FactionsEventChunkChange event = new FactionsEventChunkChange(sender, chunk, newFaction);
event.run();
if (event.isCancelled())
{
countFail++;
}
else
{
countSuccess++;
boardColl.setFactionAt(chunk, newFaction);
}
}
// Inform
usenderFaction.msg("%s<i> unclaimed <h>%d <i>of your <h>%d <i>faction land. You now have <h>%d <i>land claimed.", usender.describeTo(usenderFaction, true), countSuccess, countTotal, countFail);