private static @Nullable Double parsePrice(@NotNull Map<String, Object> plugin) {
    double[] personal = parsePrice(plugin, "personal");
    double[] commercial = parsePrice(plugin, "commercial");

    if (personal == null && commercial == null) {
      return null;
    }
    if (personal == null || commercial == null) {
      for (double value : personal == null ? commercial : personal) {
        if (value > 0) {
          return value;
        }
      }
    }
    else {
      for (int i = 0; i < 2; i++) {
        if (personal[i] > 0 && commercial[i] > 0) {
          return Math.min(personal[i], commercial[i]);
        }
      }
    }

    return null;
  }
private static @Nullable Double parsePrice(@NotNull Map<String, Object> plugin)