Enum Class ExpSource
- All Implemented Interfaces:
Serializable
,Comparable<ExpSource>
,Constable
A collection of reasons why a player would gain experience
This is used when gaining experience to determine where it came from so some effects can act differently accordingly.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionExperience resulted from breaking a blockExperience resulted from placing a blockExperience resulted from an issued commandExperience resulted from crafting an itemExperience from Bottles o' EnchantingExperience resulted from defeating a monsterExperience given through a plugin.Experience from a questExperience from smelting oreExperience resulted from an unspecified reason -
Method Summary
-
Enum Constant Details
-
MOB
Experience resulted from defeating a monster -
BLOCK_BREAK
Experience resulted from breaking a block -
BLOCK_PLACE
Experience resulted from placing a block -
CRAFT
Experience resulted from crafting an item -
COMMAND
Experience resulted from an issued command -
SPECIAL
Experience resulted from an unspecified reason -
EXP_BOTTLE
Experience from Bottles o' Enchanting -
SMELT
Experience from smelting ore -
QUEST
Experience from a quest -
PLUGIN
Experience given through a plugin. This exp is not shared
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getId
public int getId()Retrieves the ID of the experience source.
- Returns:
- ID of the experience source
-