|
@ -48,7 +48,7 @@ public class WorldController { |
|
|
world = Bukkit.getWorld(name); |
|
|
world = Bukkit.getWorld(name); |
|
|
if (world != null) { |
|
|
if (world != null) { |
|
|
world.getBlockAt(0, 80, 0).setType(Material.STONE); |
|
|
world.getBlockAt(0, 80, 0).setType(Material.STONE); |
|
|
p.teleport(new Location(world, 0, 81, 0)); |
|
|
|
|
|
|
|
|
p.teleport(new Location(world, 0, 82, 0)); |
|
|
p.sendMessage(plugin.getLang().get("setup.worldCreated").replaceAll("<name>", world.getName())); |
|
|
p.sendMessage(plugin.getLang().get("setup.worldCreated").replaceAll("<name>", world.getName())); |
|
|
return world; |
|
|
return world; |
|
|
} |
|
|
} |
|
@ -95,7 +95,6 @@ public class WorldController { |
|
|
world.setGameRuleValue("mobGriefing", "false"); |
|
|
world.setGameRuleValue("mobGriefing", "false"); |
|
|
world.setGameRuleValue("doFireTick", "false"); |
|
|
world.setGameRuleValue("doFireTick", "false"); |
|
|
world.setGameRuleValue("showDeathMessages", "false"); |
|
|
world.setGameRuleValue("showDeathMessages", "false"); |
|
|
world.getBlockAt(0, 81, 0).setType(Material.STONE); |
|
|
|
|
|
for(final World w : plugin.getServer().getWorlds()) |
|
|
for(final World w : plugin.getServer().getWorlds()) |
|
|
if(w.getName().equals(world.getName())) { |
|
|
if(w.getName().equals(world.getName())) { |
|
|
loaded = true; |
|
|
loaded = true; |
|
@ -104,6 +103,10 @@ public class WorldController { |
|
|
return loaded; |
|
|
return loaded; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void generate() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void copyWorld(World world) { |
|
|
public void copyWorld(World world) { |
|
|
world.save(); |
|
|
world.save(); |
|
|
copyFileStructure(world.getWorldFolder(), new File(plugin.getDataFolder() + "/maps/" + world.getName())); |
|
|
copyFileStructure(world.getWorldFolder(), new File(plugin.getDataFolder() + "/maps/" + world.getName())); |
|
@ -122,6 +125,10 @@ public class WorldController { |
|
|
world.setAnimalSpawnLimit(0); |
|
|
world.setAnimalSpawnLimit(0); |
|
|
world.setAmbientSpawnLimit(0); |
|
|
world.setAmbientSpawnLimit(0); |
|
|
world.setGameRuleValue("doDaylightCycle", "false"); |
|
|
world.setGameRuleValue("doDaylightCycle", "false"); |
|
|
|
|
|
world.setGameRuleValue("doMobSpawning", "false"); |
|
|
|
|
|
world.setGameRuleValue("mobGriefing", "false"); |
|
|
|
|
|
world.setGameRuleValue("doFireTick", "false"); |
|
|
|
|
|
world.setGameRuleValue("showDeathMessages", "false"); |
|
|
Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "Restarting map " + ChatColor.YELLOW + newWorldName + ChatColor.GREEN + "."); |
|
|
Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "Restarting map " + ChatColor.YELLOW + newWorldName + ChatColor.GREEN + "."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|