Enum Class ManaSource

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

public enum ManaSource extends Enum<ManaSource>

A collection of possible reasons mana was gained by a player.

This is used when giving mana to a player to allow effects to react differently depending on why it is being added.

  • Enum Constant Details

    • REGEN

      public static final ManaSource REGEN
      The player regenerated some mana back passively
    • SKILL

      public static final ManaSource SKILL
      A skill effect replenished some of their mana
    • COMMAND

      public static final ManaSource COMMAND
      A command restored some of their mana
    • SPECIAL

      public static final ManaSource SPECIAL
      The player gained mana for an unspecified reason
  • Method Details

    • values

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