Enum ExtraSpecialItemType

java.lang.Object
java.lang.Enum<ExtraSpecialItemType>
me.metallicgoat.specialItems.api.ExtraSpecialItemType
All Implemented Interfaces:
Serializable, Comparable<ExtraSpecialItemType>, java.lang.constant.Constable

public enum ExtraSpecialItemType extends Enum<ExtraSpecialItemType>
Enum representing different types of extra special items.
  • Enum Constant Details

    • COMMAND

      public static final ExtraSpecialItemType COMMAND
      Runs a custom command on use.

      There may be multiple items of this type.

    • EGG_BRIDGER

      public static final ExtraSpecialItemType EGG_BRIDGER
      Launches an egg that places blocks on its way.
    • ICE_BRIDGER

      public static final ExtraSpecialItemType ICE_BRIDGER
      Places ice below the player.
    • SILVERFISH

      public static final ExtraSpecialItemType SILVERFISH
      Launches a snowball that spawns a silverfish wherever it lands.
    • SLINGSHOT

      public static final ExtraSpecialItemType SLINGSHOT
      Launches the player in the direction they are looking.
    • TOWER

      public static final ExtraSpecialItemType TOWER
      Builds a tower around the player.
  • Method Details

    • values

      public static ExtraSpecialItemType[] 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 ExtraSpecialItemType 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
    • getItem

      @Nullable public @Nullable SpecialItem getItem()
      Get the SpecialItem associated with this type.
      Returns:
      the SpecialItem. Is null for hasMultipleItems()
    • hasMultipleItems

      public boolean hasMultipleItems()
      Get whether there may be multiple items of this type.

      Only COMMAND may have multiple items.

      Returns:
      true if there may be multiple items of this type, false otherwise
    • from

      @Nullable public static @Nullable ExtraSpecialItemType from(SpecialItem item)
      Get the ExtraSpecialItemType from a SpecialItem.
      Parameters:
      item - the SpecialItem to get the type from
      Returns:
      the ExtraSpecialItemType, or null if the item is not from this addon