aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/dev/isxander/yacl/api/Option.java
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-05-25 19:36:47 +0100
committerisXander <xandersmith2008@gmail.com>2023-05-25 19:36:47 +0100
commit2792276924cf5e292211bc0d43dbc4cf3eb9c181 (patch)
treed041268817a8c73ffa1f9a2a2a65f968c3be1ab6 /common/src/main/java/dev/isxander/yacl/api/Option.java
parentaba5085302c6ad8eec1aa9ed25a9a86758d95d34 (diff)
downloadYetAnotherConfigLib-2792276924cf5e292211bc0d43dbc4cf3eb9c181.tar.gz
YetAnotherConfigLib-2792276924cf5e292211bc0d43dbc4cf3eb9c181.tar.bz2
YetAnotherConfigLib-2792276924cf5e292211bc0d43dbc4cf3eb9c181.zip
removed `.name()` from description, replaced with option name. also javadoc
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/api/Option.java')
-rw-r--r--common/src/main/java/dev/isxander/yacl/api/Option.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/api/Option.java b/common/src/main/java/dev/isxander/yacl/api/Option.java
index 5f66c19..f0b595d 100644
--- a/common/src/main/java/dev/isxander/yacl/api/Option.java
+++ b/common/src/main/java/dev/isxander/yacl/api/Option.java
@@ -129,8 +129,21 @@ public interface Option<T> {
*/
Builder<T> name(@NotNull Component name);
+ /**
+ * Sets the description to be used by the option.
+ * @see OptionDescription
+ * @param description the static description.
+ * @return this builder
+ */
Builder<T> description(@NotNull OptionDescription description);
+ /**
+ * Sets the function to get the description by the option's current value.
+ *
+ * @see OptionDescription
+ * @param descriptionFunction the function to get the description by the option's current value.
+ * @return this builder
+ */
Builder<T> description(@NotNull Function<T, OptionDescription> descriptionFunction);
/**