Enum KeyFlag

java.lang.Object
java.lang.Enum<KeyFlag>
wtf.choco.locksecurity.api.key.KeyFlag
All Implemented Interfaces:
Serializable, Comparable<KeyFlag>, java.lang.constant.Constable

public enum KeyFlag
extends Enum<KeyFlag>
Represents a property (flag) that may be assigned to a smithed key.
Since:
3.0.0
Author:
Parker Hawke - Choco
  • Enum Constant Details

    • PREVENT_DUPLICATION

      public static final KeyFlag PREVENT_DUPLICATION
      The key cannot be duplicated in a crafting table with an unsmithed key.
    • PREVENT_MERGING

      public static final KeyFlag PREVENT_MERGING
      The key cannot be merged in a crafting table with another smithed key.
    • PREVENT_RESETTING

      public static final KeyFlag PREVENT_RESETTING
      The key cannot be reset in a crafting table.
    • BREAK_ON_USE

      public static final KeyFlag BREAK_ON_USE
      The key will break on use.
    • HIDE_BLOCK_COORDINATES

      public static final KeyFlag HIDE_BLOCK_COORDINATES
      The key should hide coordinates in the key's lore.
    • HIDE_FLAG_LORE

      public static final KeyFlag HIDE_FLAG_LORE
      The key should hide the lore applied by other key flags. Very meta...
  • Field Details

  • Method Details

    • values

      public static KeyFlag[] 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 KeyFlag 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
    • getBit

      public int getBit()
      Get the internal bit used to represent this flag in persistent storage.
      Returns:
      the internal bit representation
    • getLoreEntry

      @Nullable public String getLoreEntry()
      Get the line of text to be written in the key's lore.
      Returns:
      the lore entry. null if none