How to add multiple arraylists into a hashmap

Discussion in 'Spigot Plugin Development' started by TheMasteredPanda, May 31, 2016.

  1. Basically says it all, how'd I be able to achieve this? I have 4 arraylists (helper, mod, admin and owner) and I want to put them in a hashmap so it allows me to display the hierarchy in order in a list plugin ( http://prntscr.com/bamtnp , i.e. Owner, Admin, Mod, Helper. which would be in playname terms, [Owner] test, ][Admin] test2, [Mod] test3, [Mod] test4, [Helper] test5).

    So, how would I be able to do this?

    Cheers,
    Panda!
     
  2. You can do it this way:

    Code (Text):
    Map<String, UUID[]> rankMap = new HashMap<String, UUID[]>();
    But I see no need to store information about players in a data structure like this when you could instead simply loop through all online players and sort them by Permissions.