So I'm fairly new to configs and am wondering how to do things like adding strings and substrings e.g Groups: Groupname - Land: (X,Z),(X,Z) ext - Enemies: that - Allies: this - Members: me, you, Notch Groupname 2 - Land: - Enemies, this, groupname - Allies: - Members rage Basically like a factions plugin
Areoace If someone else has a better way than me, please share. That being said, what I do is I get the list from config. Then, I loop through all the strings, and split them. EX: Code:java List<String> list = plugin.getConfig().getStringList("Groups.GroupName");for(String s : list){ if(s.contains("Enemies:") { s.replace("Enemies:", " "); String[] enemy = s.split(", "); String e = enemy[0]; } ^This was done without Eclipse, so it may not be perfect.
Sorry to be annoying, but to make a new config how would i do so :S e.g when someone makes a group for expample: /g make - it makes a config with the g name and has all the data stored