use of me.andrew28.addons.conquer.api.events.ConquerPowerLossEvent in project Conquer by xXAndrew28Xx.
the class FOEventForwarder method onPowerLossEvent.
@EventHandler
public void onPowerLossEvent(PowerLossEvent event) {
ConquerPowerLossEvent forwardEvent = new ConquerPowerLossEvent(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.ConquerPowerLossEvent in project Conquer by xXAndrew28Xx.
the class LFEventForwarder method onPowerLoss.
@EventHandler
public void onPowerLoss(EventFactionsPowerLoss event) {
ConquerPlayer player = LFPlayer.get(plugin, event.getfPlayer());
ConquerFaction faction = LFFaction.get(plugin, event.getFaction());
ConquerPowerLossEvent forwardEvent = new ConquerPowerLossEvent(faction, player);
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
event.setCancelled(true);
}
}
use of me.andrew28.addons.conquer.api.events.ConquerPowerLossEvent in project Conquer by xXAndrew28Xx.
the class MSEventForwarder method onPowerChange.
@EventHandler
public void onPowerChange(EventFactionsPowerChange event) {
ConquerPlayer player = MSPlayer.get(plugin, event.getMPlayer());
double oldPower = player.getPower();
double newPower = event.getNewPower();
if (newPower < oldPower) {
ConquerPowerLossEvent forwardEvent = new ConquerPowerLossEvent(player.getFaction(), player);
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
event.setCancelled(true);
}
}
}
use of me.andrew28.addons.conquer.api.events.ConquerPowerLossEvent in project Conquer by xXAndrew28Xx.
the class SFEventForwarder method onPowerLossEvent.
@EventHandler
public void onPowerLossEvent(PowerLossEvent event) {
ConquerPowerLossEvent forwardEvent = new ConquerPowerLossEvent(SFFaction.get(plugin, event.getFaction()), SFPlayer.get(plugin, event.getfPlayer()));
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
event.setCancelled(true);
}
}
use of me.andrew28.addons.conquer.api.events.ConquerPowerLossEvent in project Conquer by xXAndrew28Xx.
the class FUEventForwarder method onPowerLossEvent.
@EventHandler
public void onPowerLossEvent(PowerLossEvent event) {
ConquerPowerLossEvent forwardEvent = new ConquerPowerLossEvent(FUFaction.get(plugin, event.getFaction()), FUPlayer.get(plugin, event.getfPlayer()));
callEvent(forwardEvent);
if (forwardEvent.isCancelled()) {
event.setCancelled(true);
}
}
Aggregations