Ejemplo n.º 1
0
  /** Load file */
  private static void load(Manager managerInterface, File file) {
    try {
      managerInterface.load(file);
    } catch (FileNotFoundException exception) {
      Bukkit.getServer().getLogger().info(file.getName() + " does not exist! Creating file!");
    } catch (IOException exception) {
      throw new RuntimeException("Failed to load " + file.getPath(), exception);
    }

    try {
      managerInterface.save(file);
    } catch (IOException exception) {
      throw new RuntimeException("Failed to create " + file.getPath(), exception);
    }
  }