Enum CosmeticItemOwnership.Cause

java.lang.Object
java.lang.Enum<CosmeticItemOwnership.Cause>
de.marcely.bedwars.api.cosmetics.shop.CosmeticItemOwnership.Cause
All Implemented Interfaces:
Serializable, Comparable<CosmeticItemOwnership.Cause>, java.lang.constant.Constable
Enclosing interface:
CosmeticItemOwnership

public static enum CosmeticItemOwnership.Cause extends Enum<CosmeticItemOwnership.Cause>
Represents the cause of a shop item ownership.
  • Enum Constant Details

  • Method Details

    • values

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

      public static CosmeticItemOwnership.Cause valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • storeItem

      public boolean storeItem()
      Checks whether purchases with this cause will be stored permanently.
      Returns:
      true if the purchase will be stored
    • weightsGreaterThan

      public boolean weightsGreaterThan(CosmeticItemOwnership.Cause cause)
      Get whether the weights of this cause are greater than the given one.

      E.g. a player may receive a free items, but this might have no relevance if he already purchased it. This behavior is important to not override past purchases.

      Parameters:
      cause - The cause to compare with
      Returns:
      true if this weights greater