diff --git a/src/main/java/carpetfixes/settings/CustomSettingsManager.java b/src/main/java/carpetfixes/settings/CustomSettingsManager.java index 4bb9cc5f..38660166 100644 --- a/src/main/java/carpetfixes/settings/CustomSettingsManager.java +++ b/src/main/java/carpetfixes/settings/CustomSettingsManager.java @@ -54,13 +54,13 @@ public int printAllRulesToLog(String category) { } else if(type == String.class && categories.contains(RuleCategory.COMMAND)) { options = List.of("true", "false", "ops"); } else if (type.isEnum()) { - options = Arrays.stream(type.getEnumConstants()).map(e -> ((Enum) e).name().toLowerCase(Locale.ROOT)) - .collect(Collectors.toUnmodifiableList()); + options = Arrays.stream(type.getEnumConstants()).map(e -> + ((Enum) e).name().toLowerCase(Locale.ROOT)).toList(); } else { options = List.of(); } List> validators = new ArrayList<>(); - for (Class v : rule.validate()) + for (Class v : rule.validate()) validators.add((Validator) callConstructor(v)); if (categories.contains(RuleCategory.COMMAND)) { validators.add(callConstructor(Validator._COMMAND.class)); @@ -133,7 +133,7 @@ private T callConstructor(Class cls) { } private static String convertToString(Object value) { - if (value instanceof Enum) return ((Enum) value).name().toLowerCase(Locale.ROOT); + if (value instanceof Enum) return ((Enum) value).name().toLowerCase(Locale.ROOT); return value.toString(); } }