use of net.redstoneore.legacyfactions.entity.Faction in project Conquer by xXAndrew28Xx.
the class LFClaim method setTo.
@Override
public void setTo(ClaimType type) {
Faction faction;
switch(type) {
case WILDERNESS:
faction = FactionColl.get(LFPlugin.WILDERNESS_ID);
break;
case SAFE_ZONE:
faction = FactionColl.get(LFPlugin.SAFE_ZONE_ID);
break;
case WAR_ZONE:
faction = FactionColl.get(LFPlugin.WAR_ZONE_ID);
break;
default:
return;
}
board.setFactionAt(faction, fLocation);
}
use of net.redstoneore.legacyfactions.entity.Faction in project Conquer by xXAndrew28Xx.
the class LFEventForwarder method onLandChange.
@EventHandler
public void onLandChange(EventFactionsLandChange event) {
boolean claiming = event.getCause() == EventFactionsLandChange.LandChangeCause.Claim;
ConquerPlayer player = LFPlayer.get(plugin, event.getFPlayer());
Iterator<Map.Entry<FLocation, Faction>> iterator = event.getTransactions().entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<FLocation, Faction> entry = iterator.next();
ConquerClaim<Chunk> claim = LFClaim.get(plugin, entry.getKey());
ConquerFaction faction = LFFaction.get(plugin, entry.getValue());
ConquerLandClaimEvent forwardEvent = new ConquerLandClaimEvent(claim, claiming, faction, player);
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
iterator.remove();
}
}
}
Aggregations