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

50 lines
1.2 KiB
Java
Raw Normal View History

package com.massivecraft.factions.event;
2014-04-04 20:55:21 +02:00
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Faction;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
2014-07-09 21:01:53 +02:00
/**
* Event called when a Faction is created.
*/
public class FactionCreateEvent extends Event {
2014-07-09 21:01:53 +02:00
2014-04-04 20:55:21 +02:00
private static final HandlerList handlers = new HandlerList();
private final String factionTag;
private final Player sender;
private final Faction faction;
2014-04-04 20:55:21 +02:00
public FactionCreateEvent(Player sender, String tag, Faction faction) {
2014-07-01 22:10:18 +02:00
this.factionTag = tag;
this.sender = sender;
this.faction = faction;
2014-04-04 20:55:21 +02:00
}
public FPlayer getFPlayer() {
return FPlayers.getInstance().getByPlayer(sender);
2014-04-04 20:55:21 +02:00
}
@Deprecated
2014-04-04 20:55:21 +02:00
public String getFactionTag() {
return factionTag;
}
public Faction getFaction() {
return this.faction;
}
@Override
2014-04-04 20:55:21 +02:00
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}