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

40 lines
940 B
Java
Raw Normal View History

package com.massivecraft.factions.event;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Factions;
2014-04-04 20:55:21 +02:00
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
2014-07-09 21:01:53 +02:00
/**
* Event called when a faction is disbanded.
*/
public class FactionDisbandEvent extends FactionEvent implements Cancellable {
private boolean cancelled = false;
2014-04-04 20:55:21 +02:00
private Player sender;
2014-04-04 20:55:21 +02:00
public FactionDisbandEvent(Player sender, String factionId) {
super(Factions.getInstance().getFactionById(factionId));
2014-07-01 22:10:18 +02:00
this.sender = sender;
2014-04-04 20:55:21 +02:00
}
2014-04-04 20:55:21 +02:00
public FPlayer getFPlayer() {
return FPlayers.getInstance().getByPlayer(sender);
2014-04-04 20:55:21 +02:00
}
2014-04-04 20:55:21 +02:00
public Player getPlayer() {
return sender;
}
2014-04-04 20:55:21 +02:00
@Override
public boolean isCancelled() {
return cancelled;
}
2014-04-04 20:55:21 +02:00
@Override
public void setCancelled(boolean c) {
cancelled = c;
}
}