Skip to content

Commit

Permalink
fix categories with uppercase letters empty in config gui (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts authored Sep 11, 2024
1 parent 5f46d25 commit e3ac98f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/gtnewhorizon/gtnhlib/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
String modid();

/**
* Root element category, defaults to "general". You must not specify an empty string.
* Root element category, defaults to "general".
*/
String category() default "general";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static List<IConfigElement> getConfigElements(Class<?> configClass, boole
.orElseThrow(
() -> new ConfigException("Tried to get config elements for non-registered config class!"));

val category = cfg.category();
val category = cfg.category().toLowerCase();
List<IConfigElement> result = new ArrayList<>();
if (categorized) {
if (category.isEmpty()) return getSubcategoryElements(configClass, category, rawConfig, true);
Expand Down

0 comments on commit e3ac98f

Please sign in to comment.