Search in sources :

Example 1 with ConquerFactionCreateEvent

use of me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent in project Conquer by xXAndrew28Xx.

the class MSEventForwarder method onFactionCreate.

@EventHandler
public void onFactionCreate(EventFactionsCreate event) {
    ConquerFactionCreateEvent forwardEvent = new ConquerFactionCreateEvent(MSPlayer.get(plugin, event.getMPlayer()), event.getFactionName());
    callEvent(forwardEvent);
    if (forwardEvent.isCancelled()) {
        event.setCancelled(true);
    }
}
Also used : ConquerFactionCreateEvent(me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent) EventHandler(org.bukkit.event.EventHandler)

Example 2 with ConquerFactionCreateEvent

use of me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent in project Conquer by xXAndrew28Xx.

the class FUEventForwarder method onFactionCreate.

@EventHandler
public void onFactionCreate(FactionCreateEvent event) {
    ConquerFactionCreateEvent forwardEvent = new ConquerFactionCreateEvent(FUPlayer.get(plugin, event.getFPlayer()), event.getFactionTag());
    callEvent(forwardEvent);
    if (forwardEvent.isCancelled()) {
        if (event instanceof Cancellable) {
            ((Cancellable) event).setCancelled(true);
        }
    }
}
Also used : Cancellable(org.bukkit.event.Cancellable) ConquerFactionCreateEvent(me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent) EventHandler(org.bukkit.event.EventHandler)

Example 3 with ConquerFactionCreateEvent

use of me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent in project Conquer by xXAndrew28Xx.

the class SFEventForwarder method onFactionCreate.

@EventHandler
public void onFactionCreate(FactionCreateEvent event) {
    ConquerFactionCreateEvent forwardEvent = new ConquerFactionCreateEvent(SFPlayer.get(plugin, event.getFPlayer()), event.getFactionTag());
    callEvent(forwardEvent);
    if (forwardEvent.isCancelled()) {
        if (event instanceof Cancellable) {
            ((Cancellable) event).setCancelled(true);
        }
    }
}
Also used : Cancellable(org.bukkit.event.Cancellable) ConquerFactionCreateEvent(me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent) EventHandler(org.bukkit.event.EventHandler)

Example 4 with ConquerFactionCreateEvent

use of me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent in project Conquer by xXAndrew28Xx.

the class FOEventForwarder method onFactionCreate.

@EventHandler
public void onFactionCreate(FactionCreateEvent event) {
    ConquerFactionCreateEvent forwardEvent = new ConquerFactionCreateEvent(FOPlayer.get(plugin, event.getFPlayer()), event.getFactionTag());
    callEvent(forwardEvent);
    if (forwardEvent.isCancelled()) {
        event.setCancelled(true);
    }
}
Also used : ConquerFactionCreateEvent(me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent) EventHandler(org.bukkit.event.EventHandler)

Example 5 with ConquerFactionCreateEvent

use of me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent in project Conquer by xXAndrew28Xx.

the class LFEventForwarder method onFactionCreate.

@EventHandler
public void onFactionCreate(EventFactionsCreate event) {
    ConquerFactionCreateEvent forwardEvent = new ConquerFactionCreateEvent(LFPlayer.get(plugin, event.getFPlayer()), event.getFactionTag());
    callEvent(forwardEvent);
    if (forwardEvent.isCancelled()) {
        event.setCancelled(true);
    }
}
Also used : ConquerFactionCreateEvent(me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent) EventHandler(org.bukkit.event.EventHandler)

Aggregations

ConquerFactionCreateEvent (me.andrew28.addons.conquer.api.events.ConquerFactionCreateEvent)5 EventHandler (org.bukkit.event.EventHandler)5 Cancellable (org.bukkit.event.Cancellable)2