Package dev.kitteh.factions.permissible
Interface PermSelector.Descriptor
- All Known Implementing Classes:
AbstractRelationSelector.RelationDescriptor,AbstractRoleSelector.RoleDescriptor,AbstractSelector.BasicDescriptor
- Enclosing interface:
PermSelector
public static interface PermSelector.Descriptor
Describes a type of PermSelector, and can create them.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanTrue if accepts empty.Creates this type of PermSelector based on the given input.net.kyori.adventure.text.ComponentName for display in chat.default @Nullable StringGets instructions, if any exist.name()Name, used for serialization.Gets the options, if there's a reasonable number of choices that can be generated in advance.
-
Method Details
-
create
Creates this type of PermSelector based on the given input.- Parameters:
input- input- Returns:
- PermSelector
-
name
String name()Name, used for serialization.- Returns:
- name
-
displayName
net.kyori.adventure.text.Component displayName()Name for display in chat.- Returns:
- chat display name
-
options
Gets the options, if there's a reasonable number of choices that can be generated in advance. Key is a full, valid PermSelector string, value is what should be displayed in chat.- Parameters:
faction- faction for context- Returns:
- map as described
-
acceptsEmpty
default boolean acceptsEmpty()True if accepts empty. Only default is the AllSelector.- Returns:
- true if this type doesn't need a value
-
instructions
Gets instructions, if any exist. Given if no options are provided.- Returns:
- instructions
-