Feedback on my Registration System
I am making an addon for a scripting language that adds new syntaxes (Skript)
In Skript, each syntax gets its own class and you must call the Skript.registerWhateverSyntax method on server load to use it.
You can bulk register syntaxes using
Skript.loadClasses(package, subpackage)
(assuming you register the syntax on the static block)
but this comes with a problem, you can't create a config file where you can edit what syntaxes are going to be registered, so you need to make your own registration system. I came up with this and I want feedback on it. Perhaps a way without reflection or something cleaner than this?
On server start: https://github.com/erenkarakal/SkCheese/blob/master/src/main/java/me/eren/skcheese/SkCheese.java#L14
Register syntax: https://github.com/erenkarakal/SkCheese/blob/master/src/main/java/me/eren/skcheese/elements/ExprParsedAs.java#L223 Replies
⌛
This post has been reserved for your question.
Hey @eren.! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Ping me if you reply please!!!
Post Closed
This post has been closed by <@587604022349791274>.