jasonhaxstuff Posted July 6, 2019 Posted July 6, 2019 (edited) It might be best if I show you my logical thinking when creating the configuration class for my mod. @Config(modid = Notifs.MODID, name = "Notifications") public class NotifsConfig { @Config.Name("Blacklist") @Config.Comment("A list of phrases to blacklist.") public static String[] blacklist = {}; @Config.Name("Urls") @Config.Comment("The list of URLs to send phrases to.") public static Url[] URLs = {}; class Url { @Config.Name("Urls") @Config.Comment("The URL(s).") public String[] URLs = {}; @Config.Name("Phrases") @Config.Comment("The list of phrases to send notifications for.") public String[] Phrases = {}; } } For some reason, whenever I click on the "URLs" button in the configurator, there is no option to add new objects or anything. Is there any way that I could circumvent this? Edited July 6, 2019 by jasonhaxstuff Quote
jasonhaxstuff Posted July 6, 2019 Author Posted July 6, 2019 (edited) I have come up with a janky solution to my problem. I won't mark this as solved as I would really prefer to use what I had in my previous post. @Config(modid = MODID, name = "notifications") public class NotifsConfig { @Config.Name("URLs") @Config.Comment("The list of phrases to send notifications for (separate with commas).") public static URLs = {}; @Config.Name("Phrases") @Config.Comment("The list of phrases to send notifications for (separate with commas).") public static Phrases = {}; @Config.Name("Blacklist") @Config.Comment("A list of phrases to blacklist from sending to the URLs (separate with commas).") public static Blacklist = {}; } Basically, I use the index of the current URL(s) that I'm checking to link them to the items at those same indexes in the Phrases and Blacklist arrays. To make them 2D arrays, I just split them with (escapable) commas. Edited July 6, 2019 by jasonhaxstuff This forum has some odd formatting Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.