Saber-Factions/src/main/java/com/massivecraft/factions/event/LandUnclaimEvent.java

80 lines
1.3 KiB
Java
Raw Normal View History

package com.massivecraft.factions.event;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.FPlayer;
import org.bukkit.entity.Player;
public class LandUnclaimEvent extends Event implements Cancellable
{
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private FLocation location;
private Faction faction;
private FPlayer fplayer;
public LandUnclaimEvent(FLocation loc, Faction f, FPlayer p)
{
cancelled = false;
location = loc;
faction = f;
fplayer = p;
}
public HandlerList getHandlers()
{
return handlers;
}
public static HandlerList getHandlerList()
{
return handlers;
}
public FLocation getLocation()
{
return this.location;
}
public Faction getFaction()
{
return faction;
}
public String getFactionId()
{
return faction.getId();
}
public String getFactionTag()
{
return faction.getTag();
}
public FPlayer getFPlayer()
{
return fplayer;
}
public Player getPlayer()
{
return fplayer.getPlayer();
}
@Override
public boolean isCancelled()
{
return cancelled;
}
@Override
public void setCancelled(boolean c) {
cancelled = c;
}
}