Add canBeCancelled because not every chair unsit can be cancelled

This commit is contained in:
Shevchik 2014-03-07 20:58:12 +04:00
parent 8c9c3579a8
commit 56f4ddb87e

View File

@ -9,11 +9,17 @@ public class PlayerChairUnsitEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled = false;
private boolean canbecancelled = true;
public PlayerChairUnsitEvent(Player who) {
public PlayerChairUnsitEvent(Player who, boolean canbecancelled) {
super(who);
this.canbecancelled = canbecancelled;
}
public boolean canBeCancelled() {
return canbecancelled;
}
@Override
public HandlerList getHandlers() {
return handlers;