diff --git a/build.gradle b/build.gradle index 24fbdd4..693302c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import org.apache.tools.ant.filters.ReplaceTokens group 'com.btk5h.skript-mirror' -version '2.5' +version '2.5.1' apply plugin: 'java' diff --git a/src/main/java/org/skriptlang/reflect/java/elements/events/EvtByReflection.java b/src/main/java/org/skriptlang/reflect/java/elements/events/EvtByReflection.java index 7e5ef29..8292bd3 100644 --- a/src/main/java/org/skriptlang/reflect/java/elements/events/EvtByReflection.java +++ b/src/main/java/org/skriptlang/reflect/java/elements/events/EvtByReflection.java @@ -45,7 +45,7 @@ public MyEventExecutor(Class eventClass, ListeningBehavior list @Override public void execute(Listener listener, Event event) throws EventException { if (eventClass.isInstance(event)) { - if (event instanceof Cancellable && !listeningBehavior.matches(((Cancellable) event).isCancelled())) + if (event instanceof Cancellable && listeningBehavior != null && !listeningBehavior.matches(((Cancellable) event).isCancelled())) return; Event scriptEvent;