I am working on a Minecraft Bukkit plugin for my server. Part of my plugin requires users to vote for a map. When they use the vote command (e.g. /vote <mapnumber>
), their vote is stored in a HashMap
(String Playername
, Integer mapnumber
) This is to detect if the user has already voted/wants to vote for a new map.
I then use a for loop to insert the votes into a new HashMap
(Integer Mapnumber
, Integer Numberofvotes
). Here's where I'm stumped.
I am looking for a way to figure out which Mapnumber has the most notes.