feat: 新增脚本事件

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2017-09-30 22:00:53 +08:00
parent 4a6cc97f8a
commit 2fb73aee53

View File

@ -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;
}
}