Enum Class ExpSource

java.lang.Object
java.lang.Enum<ExpSource>
studio.magemonkey.fabled.api.enums.ExpSource
All Implemented Interfaces:
Serializable, Comparable<ExpSource>, Constable

public enum ExpSource extends Enum<ExpSource>

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.

  • Enum Constant Details

    • MOB

      public static final ExpSource MOB
      Experience resulted from defeating a monster
    • BLOCK_BREAK

      public static final ExpSource BLOCK_BREAK
      Experience resulted from breaking a block
    • BLOCK_PLACE

      public static final ExpSource BLOCK_PLACE
      Experience resulted from placing a block
    • CRAFT

      public static final ExpSource CRAFT
      Experience resulted from crafting an item
    • COMMAND

      public static final ExpSource COMMAND
      Experience resulted from an issued command
    • SPECIAL

      public static final ExpSource SPECIAL
      Experience resulted from an unspecified reason
    • EXP_BOTTLE

      public static final ExpSource EXP_BOTTLE
      Experience from Bottles o' Enchanting
    • SMELT

      public static final ExpSource SMELT
      Experience from smelting ore
    • QUEST

      public static final ExpSource QUEST
      Experience from a quest
    • PLUGIN

      public static final ExpSource PLUGIN
      Experience given through a plugin. This exp is not shared
  • Method Details

    • values

      public static ExpSource[] 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

      public static ExpSource valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getId

      public int getId()

      Retrieves the ID of the experience source.

      Returns:
      ID of the experience source