title: Get Array from YAML
body: <p>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:</p>
  
  <pre><code># Locations
  Locations:
    - name: "Survival"
      position: 5
    - 
    - name: "PVP"
      position: 3
  </code></pre>
  
  <p>This is the code trying to load the array:</p>
  
  <pre><code>List&lt;String&gt; locations = config.getConfig().getStringList("Locations");
  for(int i = 0; i &lt; locations.size(); i++) {
      String[] location = locations.toArray(new String[0]);
      player.sendMessage("Name" + location[0] + ", Position" + location[1]);
  }
  </code></pre>
  
  <p>But I don't get a chat message. If I send a message over <code>for</code> I get a message.</p>