Enum Class AttachmentMode

java.lang.Object
java.lang.Enum<AttachmentMode>
studio.mevera.imperat.command.AttachmentMode
All Implemented Interfaces:
Serializable, Comparable<AttachmentMode>, Constable

@AvailableSince("1.9.0") public enum AttachmentMode extends Enum<AttachmentMode>
Defines the modes of attachment for a subcommand within a Command. This enum determines how a subcommand integrates with the usages of a command, based on the specified attachment mode.
  • Enum Constant Details

    • EMPTY

      public static final AttachmentMode EMPTY
      Attaches the subcommand to an empty usage of the Command
    • DEFAULT

      public static final AttachmentMode DEFAULT
      Attaches the subcommand to the default usage of a Command, which may be empty or contain optional arguments/parameters.
    • MAIN

      public static final AttachmentMode MAIN
      Attaches the sub command to the main CommandUsage of a Command A main usage is a usage that contains required arguments/parameters.
    • UNSET

      public static final AttachmentMode UNSET
      Behaves exactly like MAIN, It's used internally to know when to prefer the global attachment mode over the per subcommand one.
  • Method Details

    • values

      public static AttachmentMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AttachmentMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • requiresParameterInheritance

      public boolean requiresParameterInheritance()