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

60 lines
1.3 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.Faction;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
2014-04-04 20:55:21 +02:00
public class FactionRenameEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private FPlayer fplayer;
private Faction faction;
private String tag;
public FactionRenameEvent(FPlayer sender, String newTag) {
2014-07-01 21:52:40 +02:00
fplayer = sender; faction = sender.getFaction(); tag = newTag; this.cancelled = false;
2014-04-04 20:55:21 +02:00
}
public Faction getFaction() {
return (faction);
}
public FPlayer getFPlayer() {
return (fplayer);
}
public Player getPlayer() {
return (fplayer.getPlayer());
}
public String getOldFactionTag() {
return (faction.getTag());
}
public String getFactionTag() {
return (tag);
}
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean c) {
this.cancelled = c;
}
}