Map Changer

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

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

    Hectic_Will

    Hello,

    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

    chasechocolate

    I would keep a HashMap of String and Integer for the maps and the number of votes:
    Code:java
    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

    Hectic_Will

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

Share This Page