2012-03-13 13:58:51 +01:00
|
|
|
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;
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-07-09 21:01:53 +02:00
|
|
|
/**
|
|
|
|
* Event called when a faction is disbanded.
|
|
|
|
*/
|
2014-07-09 21:00:16 +02:00
|
|
|
public class FactionDisbandEvent extends FactionEvent implements Cancellable {
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-07-09 21:00:16 +02:00
|
|
|
private boolean cancelled = false;
|
2014-04-04 20:55:21 +02:00
|
|
|
private Player sender;
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public FactionDisbandEvent(Player sender, String factionId) {
|
2014-07-09 21:00:16 +02:00
|
|
|
super(Factions.i.get(factionId));
|
2014-07-01 22:10:18 +02:00
|
|
|
this.sender = sender;
|
2014-04-04 20:55:21 +02:00
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public FPlayer getFPlayer() {
|
|
|
|
return FPlayers.i.get(sender);
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public Player getPlayer() {
|
|
|
|
return sender;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
@Override
|
|
|
|
public boolean isCancelled() {
|
|
|
|
return cancelled;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
@Override
|
|
|
|
public void setCancelled(boolean c) {
|
|
|
|
cancelled = c;
|
|
|
|
}
|
2012-03-13 13:58:51 +01:00
|
|
|
}
|