diff options
author | isXander <xandersmith2008@gmail.com> | 2023-06-03 23:10:03 +0100 |
---|---|---|
committer | isXander <xandersmith2008@gmail.com> | 2023-06-04 16:25:09 +0100 |
commit | 3e36feeef60e56ef8cb7f737ac8eeab9fbcd6abb (patch) | |
tree | f9c3395b4da2235681b87a35ac5056a0724a181b /common/src/main/java/dev/isxander/yacl/api/OptionGroup.java | |
parent | d00a486d3bdf6105f8ca8af1034c384058b8c832 (diff) | |
download | YetAnotherConfigLib-3e36feeef60e56ef8cb7f737ac8eeab9fbcd6abb.tar.gz YetAnotherConfigLib-3e36feeef60e56ef8cb7f737ac8eeab9fbcd6abb.tar.bz2 YetAnotherConfigLib-3e36feeef60e56ef8cb7f737ac8eeab9fbcd6abb.zip |
Change package and modid to yacl3 and yet_another_config_lib_3 respectively
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/api/OptionGroup.java')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl/api/OptionGroup.java | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/api/OptionGroup.java b/common/src/main/java/dev/isxander/yacl/api/OptionGroup.java deleted file mode 100644 index e4a0eeb..0000000 --- a/common/src/main/java/dev/isxander/yacl/api/OptionGroup.java +++ /dev/null @@ -1,90 +0,0 @@ -package dev.isxander.yacl.api; - -import com.google.common.collect.ImmutableList; -import dev.isxander.yacl.impl.OptionGroupImpl; -import net.minecraft.network.chat.Component; -import org.jetbrains.annotations.NotNull; - -import java.util.Collection; - -/** - * Serves as a separator between multiple chunks of options - * that may be too similar or too few to be placed in a separate {@link ConfigCategory}. - * Or maybe you just want your config to feel less dense. - */ -public interface OptionGroup { - /** - * Name of the option group, displayed as a separator in the option lists. - * Can be empty. - */ - Component name(); - - OptionDescription description(); - - /** - * Tooltip displayed on hover. - */ - @Deprecated - Component tooltip(); - - /** - * List of all options in the group - */ - @NotNull ImmutableList<? extends Option<?>> options(); - - /** - * Dictates if the group should be collapsed by default. - */ - boolean collapsed(); - - /** - * Always false when using the {@link Builder} - * used to not render the separator if true - */ - boolean isRoot(); - - /** - * Creates a builder to construct a {@link OptionGroup} - */ - static Builder createBuilder() { - return new OptionGroupImpl.BuilderImpl(); - } - - interface Builder extends OptionAddable { - /** - * Sets name of the group, can be {@link Component#empty()} to just separate options, like sodium. - * - * @see OptionGroup#name() - */ - Builder name(@NotNull Component name); - - Builder description(@NotNull OptionDescription description); - - /** - * Adds an option to group. - * To construct an option, use {@link Option#createBuilder(Class)} - * - * @see OptionGroup#options() - */ - @Override - Builder option(@NotNull Option<?> option); - - /** - * Adds multiple options to group. - * To construct an option, use {@link Option#createBuilder(Class)} - * - * @see OptionGroup#options() - */ - @Override - Builder options(@NotNull Collection<? extends Option<?>> options); - - /** - * Dictates if the group should be collapsed by default - * - * @see OptionGroup#collapsed() - */ - Builder collapsed(boolean collapsible); - - OptionGroup build(); - } -} |