diff options
author | TheKodeToad <freezingma1l@outlook.com> | 2022-09-27 17:23:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 17:23:47 +0100 |
commit | 954afba75ac868945f165797f4fe0bb94f2de64a (patch) | |
tree | 92f0b5c24ab987aa6b0d599183bbcfb9a8046362 /src/main | |
parent | 63b796357e20dd360593517cd2116a618e4f9fd8 (diff) | |
download | YetAnotherConfigLib-954afba75ac868945f165797f4fe0bb94f2de64a.tar.gz YetAnotherConfigLib-954afba75ac868945f165797f4fe0bb94f2de64a.tar.bz2 YetAnotherConfigLib-954afba75ac868945f165797f4fe0bb94f2de64a.zip |
Replace name() with toString() (#27)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/dev/isxander/yacl/gui/controllers/EnumController.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/EnumController.java b/src/main/java/dev/isxander/yacl/gui/controllers/EnumController.java index 57c6c18..9989981 100644 --- a/src/main/java/dev/isxander/yacl/gui/controllers/EnumController.java +++ b/src/main/java/dev/isxander/yacl/gui/controllers/EnumController.java @@ -32,14 +32,14 @@ public class EnumController<T extends Enum<T>> implements Controller<T> { return nameableEnum.getDisplayName(); if (value instanceof TranslatableOption translatableOption) return translatableOption.getText(); - return Text.of(value.name()); + return Text.of(value.toString()); }; } /** * Constructs a cycling enum controller with a default value formatter and all values being available. * The default value formatter first searches if the - * enum is a {@link NameableEnum} else, just use {@link Enum#name()} + * enum is a {@link NameableEnum} else, just uses {@link Enum#toString()} * * @param option bound option */ |