2014-12-18 03:31:21 +01:00
|
|
|
package com.massivecraft.factions.event;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.FPlayer;
|
|
|
|
import com.massivecraft.factions.Faction;
|
|
|
|
import com.massivecraft.factions.struct.Relation;
|
|
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
|
|
|
|
public class FactionRelationWishEvent extends FactionPlayerEvent implements Cancellable {
|
2019-09-15 11:19:06 +02:00
|
|
|
private final Faction targetFaction;
|
|
|
|
private final Relation currentRelation;
|
|
|
|
private final Relation targetRelation;
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
private boolean cancelled;
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
public FactionRelationWishEvent(FPlayer caller, Faction sender, Faction targetFaction, Relation currentRelation, Relation targetRelation) {
|
|
|
|
super(sender, caller);
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
this.targetFaction = targetFaction;
|
|
|
|
this.currentRelation = currentRelation;
|
|
|
|
this.targetRelation = targetRelation;
|
|
|
|
}
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
public Faction getTargetFaction() {
|
|
|
|
return targetFaction;
|
|
|
|
}
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
public Relation getCurrentRelation() {
|
|
|
|
return currentRelation;
|
|
|
|
}
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
public Relation getTargetRelation() {
|
|
|
|
return targetRelation;
|
|
|
|
}
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
@Override
|
|
|
|
public boolean isCancelled() {
|
|
|
|
return cancelled;
|
|
|
|
}
|
2014-12-18 03:31:21 +01:00
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
@Override
|
|
|
|
public void setCancelled(boolean cancelled) {
|
|
|
|
this.cancelled = cancelled;
|
|
|
|
}
|
2014-12-18 03:31:21 +01:00
|
|
|
}
|