SkriptLang / skript-reflect

Powerful reflection utilities for Skript.
MIT License
56 stars 19 forks source link

Check section with custom expression usable sections cause NPE #91

Closed Lotzyprod closed 3 months ago

Lotzyprod commented 3 months ago

If custom event has check section any custom expression what has usable sections with this event will cause NPE on parse time.

To reproduce

expression zxcv:
    usable in:
        custom event "qwerty"
    get:
        return 1
event "qwerty":
    pattern: qwerty
    check:
        continue
on qwerty:
    set {_a} to zxcv

Additional info https://github.com/SkriptLang/skript-reflect/blob/d49527b0928c51b6a8d1dccfd0076bee31287287/src/main/java/org/skriptlang/reflect/syntax/event/elements/StructCustomEvent.java#L152 where's null setted

https://github.com/SkriptLang/skript-reflect/blob/d49527b0928c51b6a8d1dccfd0076bee31287287/src/main/java/org/skriptlang/reflect/syntax/CustomSyntaxStructure.java#L239 where NPE cause, eventWhich is null

Server information