I develope a Minecraft Bukkit Plugin and I want to save informations in a configuration file. I want to save an array in my yaml configuration file and load the data. This is my yaml file:
# Locations
Locations:
- name: "Survival"
position: 5
-
- name: "PVP"
position: 3
This is the code trying to load the array:
List<String> locations = config.getConfig().getStringList("Locations");
for(int i = 0; i < locations.size(); i++) {
String[] location = locations.toArray(new String[0]);
player.sendMessage("Name" + location[0] + ", Position" + location[1]);
}
But I don't get a chat message. If I send a message over for
I get a message.