diff options
author | isXander <xander@isxander.dev> | 2023-05-29 07:11:21 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2023-05-29 07:11:21 +0100 |
commit | dc8b14ee18c1d8737a836ac3c6c510e8f46f46eb (patch) | |
tree | 7f2a722fecdf2346eba60eeb770c856c737b3ced /common/src/main/java/dev/isxander/yacl/api | |
parent | 0774170cda931fcee000d1ceeb633c28b73b43bd (diff) | |
download | YetAnotherConfigLib-dc8b14ee18c1d8737a836ac3c6c510e8f46f46eb.tar.gz YetAnotherConfigLib-dc8b14ee18c1d8737a836ac3c6c510e8f46f46eb.tar.bz2 YetAnotherConfigLib-dc8b14ee18c1d8737a836ac3c6c510e8f46f46eb.zip |
Rename `OptionDescription#description` to `text` as well as relevant builder methods
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/api')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl/api/OptionDescription.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/api/OptionDescription.java b/common/src/main/java/dev/isxander/yacl/api/OptionDescription.java index fbae4c2..849b601 100644 --- a/common/src/main/java/dev/isxander/yacl/api/OptionDescription.java +++ b/common/src/main/java/dev/isxander/yacl/api/OptionDescription.java @@ -22,7 +22,7 @@ public interface OptionDescription { * including {@link net.minecraft.network.chat.ClickEvent}s and {@link net.minecraft.network.chat.HoverEvent}s. * @return The description of the option, with all lines merged with \n. */ - Component description(); + Component text(); /** * The image to display with the description. If the Optional is empty, no image has been provided. @@ -41,7 +41,7 @@ public interface OptionDescription { } static OptionDescription of(Component... description) { - return createBuilder().description(description).build(); + return createBuilder().text(description).build(); } OptionDescription EMPTY = new OptionDescriptionImpl(CommonComponents.EMPTY, CompletableFuture.completedFuture(Optional.empty())); @@ -50,22 +50,22 @@ public interface OptionDescription { /** * Appends lines to the main description of the option. This can be called multiple times. * On {@link Builder#build()}, the lines are merged with \n. - * @see OptionDescription#description() + * @see OptionDescription#text() * * @param description the lines to append to the description. * @return this builder */ - Builder description(Component... description); + Builder text(Component... description); /** * Appends lines to the main description of the option. This can be called multiple times. * On {@link Builder#build()}, the lines are merged with \n. - * @see OptionDescription#description() + * @see OptionDescription#text() * * @param lines the lines to append to the description. * @return this builder */ - Builder description(Collection<? extends Component> lines); + Builder text(Collection<? extends Component> lines); /** * Sets a static image to display with the description. This is backed by a regular minecraft resource |