Loading Array Lists

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

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


    Hi there.
    I'm coding a plugin, which contains ArrayLists of a config.yml File:
    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


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


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


    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