diff --git a/src/main/java/org/skriptlang/reflect/syntax/event/elements/CustomEvent.java b/src/main/java/org/skriptlang/reflect/syntax/event/elements/CustomEvent.java index c6cf5e7..dbc515c 100644 --- a/src/main/java/org/skriptlang/reflect/syntax/event/elements/CustomEvent.java +++ b/src/main/java/org/skriptlang/reflect/syntax/event/elements/CustomEvent.java @@ -76,6 +76,14 @@ public boolean init(Literal[] args, int matchedPattern, SkriptParser.ParseRes return event.isMarkedContinue(); } + @Override + public boolean load() { + CustomEvent.setLastWhich(which); + boolean parsed = super.load(); + CustomEvent.setLastWhich(null); + return parsed; + } + @Override public boolean check(Event e) { BukkitCustomEvent bukkitCustomEvent = (BukkitCustomEvent) e;