2012-03-13 13:58:51 +01:00
|
|
|
package com.massivecraft.factions.event;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.FLocation;
|
|
|
|
import com.massivecraft.factions.FPlayer;
|
2014-04-04 20:55:21 +02:00
|
|
|
import com.massivecraft.factions.Faction;
|
2012-03-13 13:58:51 +01:00
|
|
|
import org.bukkit.entity.Player;
|
2014-04-04 20:55:21 +02:00
|
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
import org.bukkit.event.Event;
|
|
|
|
import org.bukkit.event.HandlerList;
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public class LandUnclaimEvent extends Event implements Cancellable {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
private boolean cancelled;
|
|
|
|
private FLocation location;
|
|
|
|
private Faction faction;
|
|
|
|
private FPlayer fplayer;
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public LandUnclaimEvent(FLocation loc, Faction f, FPlayer p) {
|
2014-07-01 21:52:40 +02:00
|
|
|
cancelled = false; location = loc; faction = f; fplayer = p;
|
2014-04-04 20:55:21 +02:00
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public HandlerList getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public static HandlerList getHandlerList() {
|
|
|
|
return handlers;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public FLocation getLocation() {
|
|
|
|
return this.location;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public Faction getFaction() {
|
|
|
|
return faction;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public String getFactionId() {
|
|
|
|
return faction.getId();
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public String getFactionTag() {
|
|
|
|
return faction.getTag();
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public FPlayer getFPlayer() {
|
|
|
|
return fplayer;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public Player getPlayer() {
|
|
|
|
return fplayer.getPlayer();
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
@Override
|
|
|
|
public boolean isCancelled() {
|
|
|
|
return cancelled;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
@Override
|
|
|
|
public void setCancelled(boolean c) {
|
|
|
|
cancelled = c;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
}
|