Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1.     256 - private static void loadSpawners() {
  2.         for (final String cSpawn : Main.instance.levelsConfig1.getKeys(false)) {
  3.             final ConfigurationSection path = Main.instance.levelsConfig1.getConfigurationSection(cSpawn);
  4.             final EntityTypes type = EntityTypes.valueOf(path.getString("type"));
  5.             final double x = path.getDouble("x");
  6.             final double y = path.getDouble("y");
  7.             final double z = path.getDouble("z");
  8.             final int interval = path.getInt("interval");
  9.             final World world = Bukkit.getWorld(path.getString("world"));
  10.             new Spawner(new Location(world, x, y, z), type, interval).update();
  11.         }
  12.         Main.instance.getLogger().log(Level.INFO, "Loaded " + Spawner.spawners.size() + " mob spawners");
  13.     }
  14.  
  15.    163 - loadSpawners();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement