Peer Review/Edit

Discussion in 'Spigot Plugin Development' started by bman7842, Jul 9, 2015.

  1. Hello, I recently made a plugin that creates a sort of match the items game idea in minecraft. It works great and I have not found any issues with it. I'm here to ask for more experienced and professional developers to look over my code and give me their opinion on it. You can give me advice on format, ways I could reduce things and even organization. In fact, I don't care what it is as long as it is useful.

    Any help would be great! I want to improve my abilities as a developer which is why I wanted to here your feedback on my code!

    GitHub link: https://github.com/bman7842/eclipsepuzzle
     
  2. @bman7842
    Use HashSets instead of ArrayLists/Lists, you only need to add, remove, and check if entries are in the sets.
    Lists are more ogranized, e.g. you can get specific things based on index.
    HashSets don't have index's and since you don't use Index's, Use HashSet<Type> (Ex: HashSet<UUID> hashSet = new asdaisda)

    This will make information grabbing faster. Every little performance counts
     
  3. So it's more efficient becasue HashSets use less data? I'm just trying to see the benefit of using it.
     
  4. @bman7842
    It's faster putting/getting/removing/checking information from a HashSet rather than a List.
     
  5. Okay thanks for the advice, I'm updating it now!