public static void RegisterAll() { FileConfiguration config = AlixAPI.getInstance().getConfig(); Location location; for(String animationName : config.getConfigurationSection("animations").getKeys(false)) { Bukkit.getLogger().info(animationName); if (config.isSet("animations." + animationName + ".location.world")) { String worldName = config.getString("animations." + animationName + ".location.world"); double x = config.getDouble("animations." + animationName + ".location.x"); double y = config.getDouble("animations." + animationName + ".location.y"); double z = config.getDouble("animations." + animationName + ".location.z"); World world = plugin.getServer().getWorld(worldName); if (world == null) { continue; } location = new Location(world, x, y, z); } else { location = (Location) config.get("animations." + animationName + ".location"); } final int Strength = config.isSet("animations." + animationName + ".strength") ? config.getInt("animations." + animationName + ".strength") : 30; final int inOrOut = config.isSet("animations." + animationName + ".inOrOut") ? config.getInt("animations." + animationName + ".inOrOut") : 1; if(new File(plugin.getDataFolder().getAbsolutePath() + File.separator + "animations" + File.separator + animationName + ".animation" ).exists()) { BlendCameraAnimation animation = null; try { animation = BlendCameraAnimation.parse(new File(plugin.getDataFolder().getAbsolutePath() + File.separator + "animations" + File.separator + animationName + ".animation" )); } catch (IOException e) { throw new RuntimeException(e); } BlendCutscene cutscene = new BlendCutscene(animation, location); AlixAnimations.animationsList.add(new Animations(animationName, cutscene, config.getStringList("animations." + animationName + ".startactions"), config.getStringList("animations." + animationName + ".endactions"), inOrOut, Strength)); return; } else if(config.isSet("animations." + animationName + ".url")) { BlendCameraAnimation animation = null; try { animation = BlendCameraAnimation.parse(new URL(config.getString("animations." + animationName + ".url"))); } catch (IOException e) { throw new RuntimeException(e); } BlendCutscene cutscene = new BlendCutscene(animation, location); AlixAnimations.animationsList.add(new Animations(animationName, cutscene, config.getStringList("animations." + animationName + ".startactions"), config.getStringList("animations." + animationName + ".endactions"), inOrOut, Strength)); return; } else { Bukkit.getLogger().info("⚠ Warning - Skipped animation: " + animationName + " - Url / File not found"); } } }