From 56f4ddb87e4498534e2efc6008b46fbfcc0f7b01 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Fri, 7 Mar 2014 20:58:12 +0400 Subject: [PATCH] Add canBeCancelled because not every chair unsit can be cancelled --- src/com/cnaude/chairs/api/PlayerChairUnsitEvent.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/cnaude/chairs/api/PlayerChairUnsitEvent.java b/src/com/cnaude/chairs/api/PlayerChairUnsitEvent.java index c50e405..935f785 100644 --- a/src/com/cnaude/chairs/api/PlayerChairUnsitEvent.java +++ b/src/com/cnaude/chairs/api/PlayerChairUnsitEvent.java @@ -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;