Saber-Factions/src/main/java/com/massivecraft/factions/event/FactionDisbandEvent.java
t00thpick1 ee52016a87 Abstract Data storage method for future implementations. Thanks to Ryan from Reactive MC
Also included:
-Heavily optimized loading process
-Optimizations for various commands.
2014-10-30 23:59:59 -04:00

40 lines
940 B
Java

package com.massivecraft.factions.event;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Factions;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
/**
* Event called when a faction is disbanded.
*/
public class FactionDisbandEvent extends FactionEvent implements Cancellable {
private boolean cancelled = false;
private Player sender;
public FactionDisbandEvent(Player sender, String factionId) {
super(Factions.getInstance().getFactionById(factionId));
this.sender = sender;
}
public FPlayer getFPlayer() {
return FPlayers.getInstance().getByPlayer(sender);
}
public Player getPlayer() {
return sender;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean c) {
cancelled = c;
}
}