Enum Class BagSection

java.lang.Object
java.lang.Enum<BagSection>
com.pixelmonmod.pixelmon.api.battles.BagSection
All Implemented Interfaces:
ITranslatable, Serializable, Comparable<BagSection>, Constable

public enum BagSection extends Enum<BagSection> implements ITranslatable
A section of the battle bag.
  • Enum Constant Details

    • POKEBALLS

      public static final BagSection POKEBALLS
    • HP

      public static final BagSection HP
    • BATTLE_ITEMS

      public static final BagSection BATTLE_ITEMS
    • STATUS_RESTORE

      public static final BagSection STATUS_RESTORE
  • Method Details

    • values

      public static BagSection[] 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 BagSection 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
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface ITranslatable
    • isItem

      public boolean isItem(net.minecraft.world.item.ItemStack itemStack)
    • getSection

      public static BagSection getSection(int index)
      Gets a section of the bag from its enum index.
      Parameters:
      index - The enum index of the section.
      Returns:
      The section corresponding with the index, or null if the index is out of bounds.
    • hasBag

      public static boolean hasBag(String name)
      Checks if there is a section of the bag with a certain name.
      Parameters:
      name - The name to look for.
      Returns:
      Whether there is a section of the bag with the name.