Laike_Endaril Posted November 5, 2018 Posted November 5, 2018 I just added a String in my config file handler class alongside all my booleans, ints, etc. and it isn't posting to the newly created config file. Are strings not supported? And if they're not, is the best way to go about this a separate file handled by my own file handler, or is there a little trick I can use to get a string working here? Config handler class: Reveal hidden contents import net.minecraftforge.common.config.Config; @Config(modid = CombatTagged.MODID) public class CombatTagConfig { @Config.Comment({ "", "NOTICE: All configuration options are for the SERVER. On the client, none of these will have any effect", "", "", "", "How long a player is considered to be 'in combat' after taking damage from, or dealing damage to, another player (in seconds)", "If they disconnect before this amount of time has passed, they die", "" }) public static int cooldown = 10; @Config.Comment({ "", "", "If set to true, sends players messages telling them when then enter and leave combat", "I very highly suggest leaving this set to true", "" }) public static boolean showMessages = true; @Config.Comment({ "", "", "If set to true, players who are killed by this mod look like they're hit by lightning (the lightning itself doesn't actually deal any damage)", "Why would you ever disable this?", "" }) public static boolean zeusWasHere = true; @Config.Comment({ "", "", "Sets the death message! %s is a tag that is replaced by the name of the killed player", "" }) public static String deathMessage = "%s was smote for their cowardice!"; } Actual config file, after being deleted and recreated: Reveal hidden contents # Configuration file general { # # NOTICE: All configuration options are for the SERVER. On the client, none of these will have any effect # # # # How long a player is considered to be 'in combat' after taking damage from, or dealing damage to, another player (in seconds) # If they disconnect before this amount of time has passed, they die # I:cooldown=10 # # # Sets the death message! %s is a tag that is replaced by the name of the killed player # S:deathMessage=%s was smote for their cowardice! # # # If set to true, sends players messages telling them when then enter and leave combat # I very highly suggest leaving this set to true # B:showMessages=true # # # If set to true, players who are killed by this mod look like they're hit by lightning (the lightning itself doesn't actually deal any damage) # Why would you ever disable this? # B:zeusWasHere=true } Quote
V0idWa1k3r Posted November 5, 2018 Posted November 5, 2018 On 11/5/2018 at 9:15 PM, Laike_Endaril said: and it isn't posting to the newly created config file. Expand Are you sure? What's this line then? Quote # # # Sets the death message! %s is a tag that is replaced by the name of the killed player # S:deathMessage=%s was smote for their cowardice! Expand Quote
Laike_Endaril Posted November 5, 2018 Author Posted November 5, 2018 On 11/5/2018 at 9:28 PM, V0idWa1k3r said: Are you sure? What's this line then? Expand Oh dear God lol...I forgot that the entries in the config file are ordered alphabetically and not in the same order you put them in (in the java class). Which annoys me to no end, btw... Thanks again Voidwalker. I feel pretty dumb right about now lol 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.