Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. private void makeWorlds() {
  2.  
  3. World uhc;
  4. if (Bukkit.getWorld("uhc") != null) {
  5. uhc = Bukkit.getServer().createWorld(new WorldCreator("uhc"));
  6.  
  7. } else {
  8. uhc = Bukkit.createWorld(new WorldCreator("uhc").environment(World.Environment.NORMAL).type(WorldType.NORMAL).generator("TerrainControl"));
  9. }
  10. uhc.setGameRuleValue("doDaylightCycle", "false");
  11. uhc.setTime(0);
  12. uhc.setGameRuleValue("naturalRegeneration", "false");
  13.  
  14. World uhcNether;
  15. if (Bukkit.getWorld("uhc_nether") == null) {
  16. uhcNether = Bukkit.createWorld(new WorldCreator("uhc_nether").environment(World.Environment.NETHER).type(WorldType.NORMAL));
  17. } else {
  18. uhcNether = Bukkit.getServer().createWorld(new WorldCreator("map"));
  19. }
  20. uhcNether.setGameRuleValue("doDaylightCycle", "false");
  21. uhcNether.setTime(0);
  22. uhcNether.setGameRuleValue("naturalRegeneration", "false");
  23.  
  24. //spawn world
  25. World w = Bukkit.getWorld("world");
  26. w.setGameRuleValue("doDaylightCycle", "false");
  27. w.setGameRuleValue("doMobSpawning", "false");
  28. w.setGameRuleValue("doFireTick", "false");
  29. w.setGameRuleValue("naturalRegeneration", "false");
  30. w.setTime(13000);
  31. w.setDifficulty(Difficulty.PEACEFUL);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement