diff --git a/src/com/cnaude/chairs/core/api/PlayerChairSitEvent.java b/src/com/cnaude/chairs/core/api/PlayerChairSitEvent.java new file mode 100644 index 0000000..177edeb --- /dev/null +++ b/src/com/cnaude/chairs/core/api/PlayerChairSitEvent.java @@ -0,0 +1,36 @@ +package com.cnaude.chairs.core.api; + +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +public class PlayerChairSitEvent extends PlayerEvent implements Cancellable { + + private static final HandlerList handlers = new HandlerList(); + private boolean cancelled = false; + + public PlayerChairSitEvent(Player who) { + super(who); + } + + @Override + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + +} diff --git a/src/com/cnaude/chairs/core/api/PlayerChairUnsitEvent.java b/src/com/cnaude/chairs/core/api/PlayerChairUnsitEvent.java new file mode 100644 index 0000000..ebaf118 --- /dev/null +++ b/src/com/cnaude/chairs/core/api/PlayerChairUnsitEvent.java @@ -0,0 +1,36 @@ +package com.cnaude.chairs.core.api; + +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +public class PlayerChairUnsitEvent extends PlayerEvent implements Cancellable { + + private static final HandlerList handlers = new HandlerList(); + private boolean cancelled = false; + + public PlayerChairUnsitEvent(Player who) { + super(who); + } + + @Override + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + +}