Enum Class WrappedAttributeModifier.Operation

java.lang.Object
java.lang.Enum<WrappedAttributeModifier.Operation>
com.comphenix.protocol.wrappers.WrappedAttributeModifier.Operation
All Implemented Interfaces:
Serializable, Comparable<WrappedAttributeModifier.Operation>, Constable
Enclosing class:
WrappedAttributeModifier

public static enum WrappedAttributeModifier.Operation extends Enum<WrappedAttributeModifier.Operation>
Represents the different modifier operations.

The final value is computed as follows:

  1. Set X = base value.
  2. Execute all modifiers with ADD_NUMBER.
  3. Set Y = X.
  4. Execute all modifiers with MULTIPLY_PERCENTAGE.
  5. Execute all modifiers with ADD_PERCENTAGE.
  6. Y is the final value.
  • Enum Constant Details

  • Method Details

    • values

      public static WrappedAttributeModifier.Operation[] 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 WrappedAttributeModifier.Operation 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
    • getId

      public int getId()
      Retrieve the unique operation ID.
      Returns:
      Operation ID.
    • fromId

      public static WrappedAttributeModifier.Operation fromId(int id)
      Retrieve the associated operation from an ID.
      Parameters:
      id - - the ID.
      Returns:
      The operation.