Search in sources :

Example 6 with ConquerFactionRelationWishEvent

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

the class FUEventForwarder method onRelationWish.

@EventHandler
public void onRelationWish(FactionRelationWishEvent event) {
    ConquerFactionRelationWishEvent forwardEvent = new ConquerFactionRelationWishEvent(FUPlayer.get(plugin, event.getfPlayer()), FUFaction.get(plugin, event.getFaction()), FUFaction.get(plugin, event.getTargetFaction()), plugin.translate(event.getCurrentRelation()), plugin.translate(event.getTargetRelation()));
    callEvent(forwardEvent);
    if (forwardEvent.isCancelled()) {
        event.setCancelled(true);
    }
}
Also used : ConquerFactionRelationWishEvent(me.andrew28.addons.conquer.api.events.ConquerFactionRelationWishEvent) EventHandler(org.bukkit.event.EventHandler)

Aggregations

ConquerFactionRelationWishEvent (me.andrew28.addons.conquer.api.events.ConquerFactionRelationWishEvent)6 EventHandler (org.bukkit.event.EventHandler)5 ConquerFaction (me.andrew28.addons.conquer.api.ConquerFaction)3 ConquerFactionRelationEvent (me.andrew28.addons.conquer.api.events.ConquerFactionRelationEvent)3 ConquerPlayer (me.andrew28.addons.conquer.api.ConquerPlayer)2 Relation (me.andrew28.addons.conquer.api.Relation)2 EventFactionsRelation (net.redstoneore.legacyfactions.event.EventFactionsRelation)1