Skip to content

Commit 400de64

Browse files
committed
Add clarifying comment for custom event registration
1 parent 0a84dea commit 400de64

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/org/skriptlang/reflect/syntax/custom/event/elements/StructCustomEvent.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public boolean init(Literal<?>[] args, int matchedPattern, ParseResult parseResu
8383

8484
CustomEventManager.defineCustomEvent(identifier);
8585

86+
// The 'preLoad' and 'load' stages of the custom syntax registration must be called during 'init' for events.
87+
// This is because 'init' is the latest stage where custom event registration is possible.
8688
return super.preLoad() && super.load();
8789
}
8890

0 commit comments

Comments
 (0)