Issue with set(path, object) where object is a list

Discussion in 'Plugin Development' started by nzkiwi.5000, Jun 18, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    nzkiwi.5000

    Hello
    I'm having a problem with YamlConfiguration.set(path, object) method.
    using
    Code:java
    1. config.set("path", Arrays.asList(1, 2, 3, 4));

    outputs such yaml:
    Code:
    path:
    - 1
    - 2
    - 3
    - 4
    With no indentation.
    then reading from such yaml by:
    Code:java
    1. config.getIntegerList("path")

    Gives me a list of size 0.
    Is there any way of fixing this?
    Im working on Bukkit 1.7.2 R0.2 (Exact: git-Bukkit-1.7.2-R0.2-b2974jnks)
     
  2. Try instead of getIntegerList, getList
     
Thread Status:
Not open for further replies.

Share This Page