Factions/src/com/massivecraft/factions/event/FactionCreateEvent.java

63 lines
1.1 KiB
Java
Raw Normal View History

2012-03-02 02:16:45 +01:00
package com.massivecraft.factions.event;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import com.massivecraft.factions.FPlayer;
2013-04-09 13:22:23 +02:00
import com.massivecraft.factions.FPlayerColl;
2013-04-09 12:58:39 +02:00
import com.massivecraft.factions.FactionColl;
2012-03-02 02:16:45 +01:00
public class FactionCreateEvent extends Event implements Cancellable
{
private static final HandlerList handlers = new HandlerList();
private String factionTag;
private Player sender;
private boolean cancelled;
public FactionCreateEvent(Player sender, String tag)
{
this.factionTag = tag;
this.sender = sender;
this.cancelled = false;
}
2012-03-02 02:16:45 +01:00
public FPlayer getFPlayer()
{
2013-04-09 13:22:23 +02:00
return FPlayerColl.i.get(sender);
}
public String getFactionId()
{
2013-04-09 12:58:39 +02:00
return FactionColl.i.getNextId();
}
public String getFactionTag()
{
return factionTag;
}
public HandlerList getHandlers()
{
return handlers;
}
2012-03-02 02:16:45 +01:00
public static HandlerList getHandlerList()
{
return handlers;
}
2012-03-02 02:16:45 +01:00
@Override
public boolean isCancelled()
{
return cancelled;
}
2012-03-02 02:16:45 +01:00
@Override
public void setCancelled(boolean c)
{
this.cancelled = c;
}
2012-03-02 02:16:45 +01:00
}