How to get Multiple Strings from Config

Hey i am programming a Group Plugin at the moment and i want to send the player a list of all members when he types /group info

dcf0b6b2-07c0-49f8-bb4a-75a064cf6f6d {
Group=einyoutuber
GroupRank=owner
Name=EinYoutuber
}
einyoutuber { //Club Name
dcf0b6b2-07c0-49f8-bb4a-75a064cf6f6d=owner
}

That is the Config file

public String getMembers(UUID uuid){
String members = “”;
for (ConfigurationNode blockNode: accountConfig.getChildrenList()){
members = members+", "+blockNode.getString();
}
return members;
}

and that is the code where i am Trying to get all player uuids From the Club but this one doesn’t give any text

I had a similar issue not too long ago. I got around it by changing

getChildenList ()

To

getChildrenMap().keySet()

If i do this the

must be a Object and then i can’t get the Strings ?

Sorry. I meant to get values of the entries.

getChildrenMap ().values()

The keys are the values at the node. So you could cast them to strings as the value of the uuid node is “owner”

public String getMembers(UUID uuid){
UUID membersuuid;
String membersname = “”;
for (Object blockNode: accountConfig.getNode(“Group”,getAccountGroup(uuid)).getChildrenMap().keySet()){
membersuuid = UUID.fromString(blockNode.toString());
membersname = membersname+", "+getPNameByUUID(membersuuid);
}
return membersname;
}
i got it working like this

Btw i am programming sponge since yesterday so don’t blame me if this isn’t the best way to do it ^^

Seems ok. The only thing i would suggest is to use 4 spaces per line when putting code on the forums. It doesnt break formatting that way.

Like soooooooooooooooooooooooooooooooooooooooo