Replacing the default map with one from a folder

Discussion in 'Plugin Development' started by Strubo, Aug 30, 2013.

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


    Having some problems where to start here. In essence, in my plugin, I want to be able to replace the default world with a world saved in a folder, within the plugin's data folder. For example, I would have serveral maps saved in this folder, and I would want to send a map's name to a method, and it would load it.

    I've already looked at this which gives a hint at what to do, but I'm not entirely sure. My code so far:

    1. public void loadMap(Arena arena){
    2. String arenaName = arena.getName();
    3. final Chronos chronos = (Chronos) Bukkit.getServer().getPluginManager().getPlugin("ChronosBeta");
    4. WorldCreator worldCreator = new WorldCreator(chronos.getDataFolder() + File.separator + "Maps" + File.separator + arenaName);
    6. }

    In my plugin, each arena has a map of the same name, but is saved in plugin/maps
    How do I go about replacing the current world with this named map?


  2. Offline


    Don't worry, I realised you can use the Multiverse API to do all this
  3. Offline


    For those who don't want to use Multiverse, a solution?
Thread Status:
Not open for further replies.

Share This Page