SkriptLang / skript-reflect

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

Custom syntax loading order #14

Closed TPGamesNL closed 3 years ago

TPGamesNL commented 3 years ago

Custom syntax should have parse priority, like functions

TPGamesNL commented 3 years ago

ch.njol.skript.events.bukkit.PreScriptLoadEvent could be interesting Functions.loadSignature(...) is the thing that preloads ScriptLoader.loadStructure(...) takes care of calling that method, and it is specifically designed for functions, so will probably need to use PreScriptLoadEvent (enable with ScriptLoader.setCallPreloadEvent(boolean, SkriptAddon))

TPGamesNL commented 3 years ago

PR to make this possible across scripts: https://github.com/SkriptLang/Skript/pull/3066

TPGamesNL commented 3 years ago

It's merged, time to get to work

TPGamesNL commented 3 years ago

I'm wondering what parts of the loading priority people are most interested in, so I'm gonna do a poll for it: https://www.strawpoll.me/20899837 Thank you all for voting :D