Hey all, Just want a plugin that will delete and regenerate world(s) after a set amount of time (not using same seed). If it uses mv that is fine. Example config: Code: #The world that will get deleted and regenerated world: survivalworld #seed, optional seed: #generator, optional (otherwise will use minecraft world generator) generator: #time between deletings time: 600 #world to tp all players in the deleted world tp-world: spawn I would probably make it myself, but I am busy with a big plugin project/redoing a server :/
123isme1 That would be pretty server intensive to load, run for 5 minutes, unload, delete and make a new one. Why do you want this?
timtower For the style of server I want to do, players gather materials in this world, build in the plotworld, and this world is constantly being 'refreshed', sortof like a prison server.
nvm that, I guess I'll open up eclipse timtower http://dev.bukkit.org/bukkit-plugins/timed-commands/ or not EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I am not the one requesting it. That is you, so you should be able to say if it will suit your needs or not.
I say have a limited amount of chunks in that world so it's not too laggy. You can even use command blocks for this, if you don't know how and want them, PM or tag me. You can set up the command blocks too look like a plugin with coloured chat and everything
Here is the class wich controlls the deleting, unloading and generating. Code:java package me.Yekllurt.Main; import java.io.File; import org.bukkit.Bukkit;import org.bukkit.World;import org.bukkit.WorldCreator;import org.bukkit.WorldType;import org.bukkit.World.Environment; public class ResetWorld { private World world; private File file; public ResetWorld(World w, File f){ this.world = w; this.file = f; } public void unloadWorld(){ if(this.world == null){ Bukkit.broadcastMessage("§4Failed unloading " + this.world.getName()); }else{ Bukkit.broadcastMessage("§6Unloading " + this.world.getName() + ""); Bukkit.getServer().unloadWorld(this.world, true); Bukkit.broadcastMessage("§6Unloaded " + this.world.getName() + ""); } } public void loadWorld(){ if(this.world == null){ Bukkit.broadcastMessage("§4Failed loading " + this.world.getName()); }else{ Bukkit.broadcastMessage("§6Loading " + this.world.getName() + ""); Bukkit.getServer().unloadWorld(this.world, false); Bukkit.broadcastMessage("§6Loaded " + this.world.getName() + ""); } } public void createWorld(String name, long seed, boolean useSeed, WorldType worldType, boolean useWorldType, Environment enviromment, boolean useEnviromment, String generator, boolean useGenerator, boolean generateStructure){ String info = ""; WorldCreator worldCreator = new WorldCreator(name); info = "§6Name: " + name; if(useSeed){ worldCreator.seed(seed); info = info + " Seed: " + seed; }else{ info = info + " Seed: random Seed"; } if(useWorldType){ worldCreator.type(worldType); info = info + " World Type: " + worldType.toString(); }else{ info = info + " World Type: normal"; } if(useEnviromment){ worldCreator.environment(enviromment); info = info + " Enviromment: " + enviromment.toString(); }else{ info = info + " Enviromment: normal"; } if(useGenerator){ worldCreator.generator(generator); info = info + " Generator: " + generator; }else{ info = info + " Generator: standard"; } if(generateStructure){ worldCreator.generateStructures(true); info = info + " Generate Structure: true"; }else{ info = info + " Generate Structure: false"; } Bukkit.broadcastMessage("Creating world: " + name); Bukkit.broadcastMessage(info); worldCreator.createWorld(); Bukkit.broadcastMessage("Created world: " + name); } //delete world method by ThunderWaffeMc public boolean deleteWorld() { if(file.exists()) { File files[] = file.listFiles(); for(int i=0; i<files.length; i++) { if(files[i].isDirectory()) { files[i].delete(); } else { files[i].delete(); } } } return(file.delete()); } }[/i][/i][/i] Here is the onEnable() part Code:java public void onEnable(){ Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { @Override public void run() { String getResetTimeOutOfConfig = "06:00:00"; DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); Date date = new Date(); String actualTime = dateFormat.format(date); if(actualTime == getResetTimeOutOfConfig){ ResetWorld resetWorld = new ResetWorld(Bukkit.getWorld("world")); World w = Bukkit.getWorld("world"); World otherWorld = Bukkit.getWorld("spawn"); for(Player online : Bukkit.getOnlinePlayers()){ if(online.getWorld() == w){ online.teleport(otherWorld.getSpawnLocation()); } } resetWorld.unloadWorld(); resetWorld.deleteWorld(); resetWorld.createWorld("NewWorld", 50, true, WorldType.NORMAL, true, Environment.NORMAL, true, "Generator", false, true); } } }, 0, 20 * 60 * 1); } If you compile that coorect it will check every minute for resting the world. If the server time equals the reset time it will reset