Regenerating certain area

Discussion in 'Plugin Development' started by Newby, Oct 20, 2013.

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

    Newby

    I have seen how to regenerate a world but I was wondering how would I regenerate a certain area? Like from X: 0, Z: 0 to X: 250, Z: 250
     
  2. Offline

    RealDope

    Store all block changes in that area, revert them.
     
  3. Offline

    Newby

    RealDope What do you think the best place to store it to would be?
     
  4. Offline

    RealDope

    The RAM?
     
  5. Offline

    Newby

    You asking how much ram my server has? It has 32 gb
     
  6. Offline

    Cr4zy[Box]


    No he is telling you where you would save it lol
     
  7. Offline

    Newby

    RealDope Is this how I should store the blocks?
    Code:java
    1. @EventHandler
    2. public void onBlockBreakTwo(BlockBreakEvent evt) {
    3. if (isInSpawnTwo(evt.getBlock().getLocation())) {
    4. if(!(isInSpawn(evt.getBlock().getLocation()))) {
    5. plugin.getConfig().set("BrokenSpawnBlocks.", evt.getBlock());
    6. }
    7. }
    8. }
     
  8. Offline

    RealDope

    No, store them in the memory. Write to a file occasionally
     
  9. Offline

    CraftBang

    If that's not going to work, you can also choose this way:
    Get worldguard, make a region.
    http://dev.bukkit.org/bukkit-plugins/regionstates/
    Use regionstates and your console to let the region load from a backup.
    (If you don't know how to use the console from your plugin )
    Code:
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "[SIZE=13px][FONT=Andale Mono]regionstate[/FONT][/SIZE][SIZE=13px][FONT=Andale Mono]load[/FONT][/SIZE][SIZE=13px][FONT=Andale Mono]world_name[/FONT][/SIZE][SIZE=13px][FONT=Andale Mono]region_name[/FONT][/SIZE][SIZE=13px][FONT=Andale Mono]backup_name[/FONT][/SIZE]");
    Enjoy :p
     
Thread Status:
Not open for further replies.

Share This Page