Posted May 29, 201510 yr I can't really find much documentation on Configs, especially strings... To put simply, I want to have it so that a user will set the information of the item. When I do something like a boolean, I do it like so: public static boolean disableUberium; public static boolean disabled = false; final String UBERIUM = Main.config.CATEGORY_GENERAL + Main.config.CATEGORY_SPLITTER + "Materials"; Main.config.addCustomCategoryComment(UBERIUM, "Disable materials here"); this.disableUberium = Main.config.get(UBERIUM, "I don't like being OP", disabled).getBoolean(disabled); if(Main.config.hasChanged()){ Main.config.save(); } So if I was to do a string how would I do it? I thought it would be like this, but then I get lost: public static String description; final String DESC = Main.config.CATEGORY_GENERAL + Main.config.CATEGORY_SPLITTER + "Materials"; this.description = Main.config.get(DESC, "default text").getString(); if(Main.config.hasChanged()){ Main.config.save(); } But it doesn't seem to work, any ideas? (default text is what the description of the item would be) Why bother?
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.