Package me.metallicgoat.specialItems.api
Enum ExtraSpecialItemType
- All Implemented Interfaces:
Serializable,Comparable<ExtraSpecialItemType>,java.lang.constant.Constable
Enum representing different types of extra special items.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRuns a custom command on use.Launches an egg that places blocks on its way.Places ice below the player.Launches a snowball that spawns a silverfish wherever it lands.Launches the player in the direction they are looking.Builds a tower around the player. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ExtraSpecialItemTypefrom(SpecialItem item) Get the ExtraSpecialItemType from a SpecialItem.@Nullable SpecialItemgetItem()Get the SpecialItem associated with this type.booleanGet whether there may be multiple items of this type.static ExtraSpecialItemTypeReturns the enum constant of this type with the specified name.static ExtraSpecialItemType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
COMMAND
Runs a custom command on use.There may be multiple items of this type.
-
EGG_BRIDGER
Launches an egg that places blocks on its way. -
ICE_BRIDGER
Places ice below the player. -
SILVERFISH
Launches a snowball that spawns a silverfish wherever it lands. -
SLINGSHOT
Launches the player in the direction they are looking. -
TOWER
Builds a tower around the player.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getItem
Get the SpecialItem associated with this type.- Returns:
- the SpecialItem. Is
nullforhasMultipleItems()
-
hasMultipleItems
public boolean hasMultipleItems()Get whether there may be multiple items of this type.Only
COMMANDmay have multiple items.- Returns:
- true if there may be multiple items of this type, false otherwise
-
from
Get the ExtraSpecialItemType from a SpecialItem.- Parameters:
item- the SpecialItem to get the type from- Returns:
- the ExtraSpecialItemType, or
nullif the item is not from this addon
-