Skip to content

Commit

Permalink
Merge pull request #117 from SkriptLang/patch/fix-null-listening-beha…
Browse files Browse the repository at this point in the history
…vior

Fix NPE on default case of listening behavior
  • Loading branch information
sovdeeth authored Jul 15, 2024
2 parents 26facfa + d13326b commit 226fdb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public MyEventExecutor(Class<? extends Event> 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;
Expand Down

0 comments on commit 226fdb7

Please sign in to comment.