regeneration world

Discussion in 'Plugin Development' started by Mother__, Jul 30, 2014.

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

    Mother__

    Hi guys i will finish my plugin hunger games like mcpvp but how i can regeneration new world without stop or reload server

    PS : i use terraincontrol

    i try this.

    Code:java
    1.  
    2.  
    3. int chunks = 0;
    4.  
    5. World world = Bukkit.getWorld("world");
    6.  
    7. for(Chunk chunk: world.getLoadedChunks()){
    8. world.regenerateChunk(chunk.getX(), chunk.getZ());
    9. chunks+=1;
    10. }
    11.  
    12. Bukkit.getServer().unloadWorld("world", false);
    13.  
    14. WorldCreator wo = new WorldCreator("world");
    15.  
    16. Long see = (new Random()).nextLong();
    17.  
    18. wo.seed(see);
    19. wo.generator("TerrainControl");
    20. wo.createWorld();
    21.  
    22.  


    but not working how i can make that?
     
  2. Offline

    fireblast709

    Mother__ you cannot unload the main three worlds (the worldname is specified in server.properties.)
     
  3. Offline

    Mother__

    Holy shit u give me other solution?
     
  4. Offline

    fireblast709

    Mother__ use your own world (like, create a new one)
     
  5. Offline

    Mother__

    create new world with same name ?
     
  6. Offline

    fireblast709

    Mother__ no with a name that is not the one in server.properties. Using something like 'hg_world' should work, or make it configurable.
     
Thread Status:
Not open for further replies.

Share This Page