Package net.luckperms.api.metastacking
Interface MetaStackDefinition
-
public interface MetaStackDefinitionRepresents a meta stack model, consisting of a chain of elements, separated by spacers.The resultant string is constructed as: [start spacer] [element] [middle spacer] [element] [middle spacer] [element] [end spacer]
Definitions can be passed to a users UserData instance using MetaContexts, and the result of this stack can be retrieved from the returned MetaData instance.
-
-
Field Summary
Fields Modifier and Type Field Description static OptionKey<MetaStackDefinition>PREFIX_STACK_KEYTheOptionKeyfor the prefixMetaStackDefinition.static OptionKey<MetaStackDefinition>SUFFIX_STACK_KEYTheOptionKeyfor the suffixMetaStackDefinition.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull DuplicateRemovalFunctiongetDuplicateRemovalFunction()Gets the duplicate removal function, applied to the entries before formatting takes place.@NonNull @Unmodifiable List<MetaStackElement>getElements()Gets an immutable list of the elements in this stack definition@NonNull StringgetEndSpacer()Gets the spacer added after any stack elements@NonNull StringgetMiddleSpacer()Gets the spacer added between stack elements@NonNull StringgetStartSpacer()Gets the spacer string added before any stack elements
-
-
-
Field Detail
-
PREFIX_STACK_KEY
static final OptionKey<MetaStackDefinition> PREFIX_STACK_KEY
TheOptionKeyfor the prefixMetaStackDefinition.
-
SUFFIX_STACK_KEY
static final OptionKey<MetaStackDefinition> SUFFIX_STACK_KEY
TheOptionKeyfor the suffixMetaStackDefinition.
-
-
Method Detail
-
getElements
@NonNull @Unmodifiable List<MetaStackElement> getElements()
Gets an immutable list of the elements in this stack definition- Returns:
- the elements in this stack
-
getDuplicateRemovalFunction
@NonNull DuplicateRemovalFunction getDuplicateRemovalFunction()
Gets the duplicate removal function, applied to the entries before formatting takes place.- Returns:
- the duplicate removal function
-
getStartSpacer
@NonNull String getStartSpacer()
Gets the spacer string added before any stack elements- Returns:
- the start spacer
-
getMiddleSpacer
@NonNull String getMiddleSpacer()
Gets the spacer added between stack elements- Returns:
- the middle spacer
-
-