From 2fb73aee53a17ee62f5d4729e60d15f4ead6f091 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Sat, 30 Sep 2017 22:00:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../java/pw/yumc/MiaoScript/ScriptEvent.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/main/java/pw/yumc/MiaoScript/ScriptEvent.java diff --git a/src/main/java/pw/yumc/MiaoScript/ScriptEvent.java b/src/main/java/pw/yumc/MiaoScript/ScriptEvent.java new file mode 100644 index 0000000..631f5eb --- /dev/null +++ b/src/main/java/pw/yumc/MiaoScript/ScriptEvent.java @@ -0,0 +1,38 @@ +package pw.yumc.MiaoScript; + +import org.bukkit.event.Cancellable; + +import jdk.nashorn.api.scripting.ScriptObjectMirror; + +/** + * Created with IntelliJ IDEA + * + * @author 喵♂呜 + * Created on 2017/9/30 21:32. + */ +public class ScriptEvent extends BaseEvent implements Cancellable { + private ScriptObjectMirror mirror; + private boolean cancelled = false; + + public ScriptEvent(ScriptObjectMirror mirror) { + this.mirror = mirror; + } + + public ScriptObjectMirror getMirror() { + return mirror; + } + + public void setMirror(ScriptObjectMirror mirror) { + this.mirror = mirror; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @Override + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } +}