Hey, I have a configuration file like so Code: Game: Map1: world: world coords: x: 1 y: 2 z: 3 Map2: world: world coords: x: 1 y: 2 z: 3 and it goes on, what I want to make is so when someone does /vote Map1 it will then add 1 point against that map name, but if I only had Map1 and Map2 in config and I do /vote Map3 it will return an error. Any tips?
Easy, just check for the command arguments and if they match a configuration variable then add one to a list. Code:java List<String> map1counter = new ArrayList<String>();List<String> map2counter = new ArrayList<String>();List<String> map3counter = new ArrayList<String>(); Then check to see which one has the most amount of indexs available and select that map.