Search in sources :

Example 6 with ConquerFactionRelationEvent

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

the class LFEventForwarder method onRelationChange.

@EventHandler
public void onRelationChange(EventFactionsRelation event) {
    Relation oldRelation = plugin.translate(event.getOldRelation());
    Relation newRelation = plugin.translate(event.getRelation());
    ConquerFaction faction = LFFaction.get(plugin, event.getFaction());
    ConquerFaction targetFaction = LFFaction.get(plugin, event.getTargetFaction());
    ConquerFactionRelationEvent forwardEvent = new ConquerFactionRelationEvent(faction, targetFaction, oldRelation, newRelation);
    callEvent(forwardEvent);
}
Also used : Relation(me.andrew28.addons.conquer.api.Relation) EventFactionsRelation(net.redstoneore.legacyfactions.event.EventFactionsRelation) ConquerFaction(me.andrew28.addons.conquer.api.ConquerFaction) ConquerFactionRelationEvent(me.andrew28.addons.conquer.api.events.ConquerFactionRelationEvent) EventHandler(org.bukkit.event.EventHandler)

Aggregations

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