I have a problem, I want to set one of my sections in the config to "requests: []" like a closed string list. I have the following code: Code (Text): String brackets = "[]"; getFriends().set(stringID+".requests", brackets); getFriends().set(stringID+".friends", brackets); saveFriends(); However, in the yml it ends up being "requests: '[]'" with a quotation mark. How can I solve this?
You would need to have the quotes around it, as it is a string. You would then manually parse it. Alternatively you can use a String List which will use hyphens on new lines to indicate different strings.