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 Type
    Method
    Description
    default boolean
    True if accepts empty.
    create(String input)
    Creates this type of PermSelector based on the given input.
    net.kyori.adventure.text.Component
    Name for display in chat.
    default @Nullable String
    Gets instructions, if any exist.
    Name, used for serialization.
    default @Nullable Map<String,String>
    options(Faction faction)
    Gets the options, if there's a reasonable number of choices that can be generated in advance.
  • Method Details

    • create

      PermSelector create(String input)
      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

      default @Nullable Map<String,String> options(Faction faction)
      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

      default @Nullable String instructions()
      Gets instructions, if any exist. Given if no options are provided.
      Returns:
      instructions