Solved ArrayList on Command

Discussion in 'Plugin Development' started by krazytraynz, Feb 4, 2014.

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

    krazytraynz

    Is it possible to create an ArrayList when a player executes a command? I need a way to keep track of used strings for specific groups of players, and the number of groups could be constantly changing.

    EDIT: Actually, I don't think my idea would work, unless you can use strings in place of the actual ArrayList name. Is there any other way to do what I need to?
     
  2. Offline

    epicfacecreeper

    Try using a HashMap of ArrayLists.
    Code:java
    1. Map<String, ArrayList<String>> map = new HashMap<>();
     
    krazytraynz likes this.
  3. Offline

    krazytraynz


    Never would have thought of that, thanks :D
     
Thread Status:
Not open for further replies.

Share This Page