Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileConfiguration config = getConfig();
- ConfigurationSection estaLoc = config.getConfigurationSection("Location.");
- for (String estaNomb : estaLoc.getKeys(false)) {
- Location location = null;
- ItemStack item = null;
- ConfigurationSection estaSec = estaLoc.getConfigurationSection(estaNomb);
- {
- World world = Bukkit.getWorld(estaSec.getString(".World"));
- double x = estaSec.getDouble(".X");
- double y = estaSec.getDouble(".Y");
- double z = estaSec.getDouble(".Z");
- location = new Location(world, x, y, z);
- }
- {
- Material Icono = Material.matchMaterial(estaSec.getString(".Item"));
- item = new ItemStack(Icono);
- }
- estaciones.add(new Points(location, item));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement