Advertisement
Cavayo

Untitled

Apr 6th, 2020
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1.         FileConfiguration config = getConfig();
  2.         ConfigurationSection estaLoc = config.getConfigurationSection("Location.");
  3.  
  4.         for (String estaNomb : estaLoc.getKeys(false)) {
  5.             Location location = null;
  6.             ItemStack item = null;
  7.             ConfigurationSection estaSec = estaLoc.getConfigurationSection(estaNomb);
  8.             {
  9.                 World world = Bukkit.getWorld(estaSec.getString(".World"));
  10.                 double x = estaSec.getDouble(".X");
  11.                 double y = estaSec.getDouble(".Y");
  12.                 double z = estaSec.getDouble(".Z");
  13.                 location = new Location(world, x, y, z);
  14.             }
  15.             {
  16.                 Material Icono = Material.matchMaterial(estaSec.getString(".Item"));
  17.                 item = new ItemStack(Icono);
  18.             }
  19.             estaciones.add(new Points(location, item));
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement