Anywhere to actually learn about these (methods?) Not the typical oracle tutorials, I'd like to see a more simplified/noob friendly tutorials.
Hash map is a key/value setup. The key is unique while values can be duplicated. For example HashMap<Player,Integer> playerKills When a player kills something. Int kills = playerKills.get(plr); playerKills.put(plr,kills +1); Array lists are single dimensional, meaning it's just a list of objects. List<ItemStack> items = new ArrayList<ItemStack>(); for(ItemStack islr.getInventory()) Items.add(is); Now you have a list of items that you can do stuff with. Map<K,V> is an interface, HashMap<K,V> is a class that implements Map. Sent from my iPhone using Tapatalk
Thank you! Do you know of anyway I can practice this? I may start with HashMaps but I would like an info source or somewhere to start
Well unless you're just writing really simple java programs this information may not be of much use to you, it takes a lot of code to get a plugin up and running before you can make much use of hashmaps and lists. Knowing java helps but the spigot API has its own set of rules and quirks that give it its very own learning curve. Sent from my iPhone using Tapatalk
Sure, you could create a custom party class that inside had a set for members, an object for the party leader or whatever else you wanted. Then a Set<Party> = new HashSet<Party>(); (Hash set is like a list but has no set order and only contains unique values. ) And you could add your new Party(); object to it to track the active parties. Or a simpler method might be HashMap<Player,List<Player>> parties Where player is the leader of the party and the list contains the party members. Sent from my iPhone using Tapatalk
Well, I don't know about that (not being able to test without a complete thing). You can test. Here is a test using that online thing so you can see: Map -> https://ideone.com/6jLab6 List -> https://ideone.com/TS1S6M