Example #1
0
  DataType(
      int id,
      Class<? extends DataEntry> entryClass,
      String configName,
      boolean canHere,
      boolean canRollback) {
    this.id = id;
    this.entryClass = entryClass;
    this.canHere = canHere;
    this.configName = configName;
    this.canRollback = canRollback;
    this.isLogged = HawkEye.getInstance().getConfig().getBoolean("log." + configName);

    try {
      this.entryConstructor =
          entryClass.getConstructor(
              String.class,
              Timestamp.class,
              int.class,
              DataType.class,
              String.class,
              String.class,
              int.class,
              int.class,
              int.class);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #2
0
 /** Reloads enum's isLogged values from disk */
 public void reload() {
   this.isLogged = HawkEye.getInstance().getConfig().getBoolean("log." + configName);
 }