Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player player = (Player) sender;
- FileUtil util = new FileUtil(FileUtil.getDataFile("test.yml", "mines"));
- YamlConfiguration configuration = util.getConfiguration();
- Location center = player.getLocation();
- for (String key : configuration.getKeys(false)) {
- if (key.equalsIgnoreCase("spawn")) {
- continue;
- }
- Bukkit.broadcastMessage("ran");
- ConfigurationSection section = configuration.getConfigurationSection(key);
- double x = section.getDouble("x");
- double y = section.getDouble("y");
- double z = section.getDouble("z");
- player.getWorld().getBlockAt((int) (center.clone().getX() + x), (int) (center.clone().getY() + y), (int) (center.clone().getZ() + z)).setType(Material.valueOf(section.getString("material")));
- }
Advertisement
Add Comment
Please, Sign In to add comment