Solved Voting/Loading of Maps

Discussion in 'Plugin Development' started by flash1110, Nov 1, 2015.

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

    flash1110

    I have a Survival Games plugin I am coding. What I want to do is have players able to vote for a map they will play on. After it reaches 13 votes, the map will be chosen. I'm just not sure how to get multiple instances of a map, paste it (so that hanging items are not affected, as well as locations/spawn points, as those are set.)

    Basically, I'm not sure how to handle loading/unloading maps and resetting them.

    I don't really have any code that would be useful, as I'm not sure how to handle it. I have these classes so far: Map (Has the spawn locations, world, chests, etc.), Game (Game object, hosts the votes and map, as well as players), and GameManager (Haven't added anything in it yet.)
     
  2. Offline

    Scimiguy

    You either want to learn schematics, or create your own system using for loops -- looping over the block types, data, and locations for every block and setting them in the world.
    @flash1110
     
  3. Offline

    Zombie_Striker

    @flash1110
    1. Create classes which will store the maps (location of blocks/ entities/ ect.)
    2. Make some collection that stores all the maps.
    3. Link each map to an integer, (1 = map1, 2 = map2)
    4. Make a Hashmap which stores the map as keys, and points for the map as values.
    5. Find out which map has the most points.
    6. Make a method which loops through the region (three for loops, for the x ,y, and z) and applies the data.
     
  4. Offline

    CrystalxNeth

    @flash1110 Why not just copy the map files (from a folder where you can store all of the maps) and then load the world with Bukkit once the files are done?
     
  5. Offline

    flash1110

    I created a WorldLoader to load and restore maps. Solved.
     
Thread Status:
Not open for further replies.

Share This Page