Enum Class RequirementType

java.lang.Object
java.lang.Enum<RequirementType>
de.craftsblock.craftsnet.api.requirements.meta.RequirementType
All Implemented Interfaces:
Serializable, Comparable<RequirementType>, Constable

public enum RequirementType extends Enum<RequirementType>
Represents the different types of requirements that can be defined for annotations.

This enum is used in conjunction with RequirementMeta to specify how a requirement should be processed. Each type has a distinct purpose and influences the behavior of requirement handling:

  • FLAG: Indicates that the presence of the annotation itself is part of the requirement, without needing any additional data.
  • STORING: Indicates that the annotation contains specific data which should be extracted and stored for later use.
Since:
3.1.0-SNAPSHOT
  • Enum Constant Details

    • FLAG

      public static final RequirementType FLAG
      A requirement type indicating that the presence of the annotation alone is the part of the requirement.
    • STORING

      public static final RequirementType STORING
      A requirement type indicating that the annotation holds specific data that must be extracted and stored.
  • Method Details

    • values

      public static RequirementType[] 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 RequirementType 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