feat: 新增脚本事件
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
4a6cc97f8a
commit
2fb73aee53
38
src/main/java/pw/yumc/MiaoScript/ScriptEvent.java
Normal file
38
src/main/java/pw/yumc/MiaoScript/ScriptEvent.java
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user