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#L22
3 Replies
JavaBot
JavaBot12mo ago
for (String key : this.getConfig().getConfigurationSection("syntaxes").getKeys(false)) {
for (String key : this.getConfig().getConfigurationSection("syntaxes").getKeys(false)) {
This post has been reserved for your question.
Hey @eren.! Please use /close or the Close 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.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
eren.
eren.OP12mo ago
Ping me if you reply please!!!
JavaBot
JavaBot12mo ago
Post Closed
This post has been closed by <@587604022349791274>.
Want results from more Discord servers?
Add your server