Beispiel #1
0
  /**
   * Load rules from JAML file path
   *
   * @param path path to rules file
   * @return rules
   * @throws FileNotFoundException if file path not exist
   */
  public static Rules loadRules(String path) throws FileNotFoundException {
    File rule;
    if (path == null || path.isEmpty()) path = "rules.yml";

    rule = new File(path);
    return Yaml.loadType(rule, Rules.class);
  }