Map Changer

Discussion in 'Plugin Development' started by Hectic_Will, Feb 15, 2013.

Thread Status:
Not open for further replies.
  1. Offline



    I am currently trying to develop a plugin for my server but I need some help on an in-game map changer where players can vote for a map they want to play on and the server loads up the map in-game. If anyone has something that may help, please leave it in the comments. Thanks
  2. Offline


    I would keep a HashMap of String and Integer for the maps and the number of votes:
    1. HashMap<String, Integer> votes = new HashMap<String, Integer>();
    2. //When they vote
    3. String mapName = <the map that they voted for>;
    4. int numVotes = votes.get(mapName);
    5. votes.put(mapName, numVotes + 1);
  3. Offline


    Thanks man, your a life saver
Thread Status:
Not open for further replies.

Share This Page