Loading Array Lists

Discussion in 'Plugin Development' started by Nico4898, May 22, 2014.

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

    Nico4898

    Hi there.
    I'm coding a plugin, which contains ArrayLists of a config.yml File:
    Code:java
    1. static ArrayList<String> Winner = (ArrayList<String>) config.getStringList("Winners");

    But when I use this list and clear the config after a countdown , it uses the old Array-List again.
    It gets only updated if I execute the reload command...
    How can I create a method , which updates the Array-List???
     
  2. Offline

    Trevor1134

    Nico4898 Do you execute Winner.clear(); ?
     
  3. Offline

    MCForger

    Nico4898
    When you want to clear the old ArrayList, just do config.set("Winners", null);. That should clear it out.
     
  4. Offline

    Nico4898

    I'm using cfg.set(Winners, null);

    This doesn't fix my problem...
    I have a "Buyers" Array-List too, which stores the playernames and this list of names will be randomized , after a countdown expires.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
Thread Status:
Not open for further replies.

Share This Page