use of me.andrew28.addons.conquer.api.events.ConquerLandClaimEvent in project Conquer by xXAndrew28Xx.
the class FOEventForwarder method onLandUnclaimEvent.
@EventHandler
public void onLandUnclaimEvent(LandUnclaimEvent event) {
ConquerLandClaimEvent forwardEvent = new ConquerLandClaimEvent(FOClaim.get(plugin, event.getLocation()), false, FOFaction.get(plugin, event.getFaction()), FOPlayer.get(plugin, event.getFPlayer()));
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
event.setCancelled(true);
}
}
use of me.andrew28.addons.conquer.api.events.ConquerLandClaimEvent in project Conquer by xXAndrew28Xx.
the class FUEventForwarder method onLandUnclaimEvent.
@EventHandler
public void onLandUnclaimEvent(LandUnclaimEvent event) {
ConquerLandClaimEvent forwardEvent = new ConquerLandClaimEvent(FUClaim.get(plugin, event.getLocation()), false, FUFaction.get(plugin, event.getFaction()), FUPlayer.get(plugin, event.getfPlayer()));
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
event.setCancelled(true);
}
}
use of me.andrew28.addons.conquer.api.events.ConquerLandClaimEvent 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