Enum Class TrophyType

java.lang.Object
java.lang.Enum<TrophyType>
com.github.crashdemons.miningtrophies.TrophyType
All Implemented Interfaces:
Serializable, Comparable<TrophyType>, Constable

public enum TrophyType extends Enum<TrophyType>
An enum defining each supported trophy type, with all necessary information to create it. Note: generally each enum entry should correspond to a Material type of a block that can be broken.
Author:
crash
  • Enum Constant Details

    • IRON_ORE

      public static final TrophyType IRON_ORE
    • GOLD_ORE

      public static final TrophyType GOLD_ORE
    • COPPER_ORE

      public static final TrophyType COPPER_ORE
    • AMETHYST_CLUSTER

      public static final TrophyType AMETHYST_CLUSTER
    • DIAMOND_ORE

      public static final TrophyType DIAMOND_ORE
    • EMERALD_ORE

      public static final TrophyType EMERALD_ORE
    • REDSTONE_ORE

      public static final TrophyType REDSTONE_ORE
    • LAPIS_ORE

      public static final TrophyType LAPIS_ORE
    • NETHER_QUARTZ_ORE

      public static final TrophyType NETHER_QUARTZ_ORE
    • COAL_ORE

      public static final TrophyType COAL_ORE
    • SPAWNER

      public static final TrophyType SPAWNER
  • Method Details

    • values

      public static TrophyType[] 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 TrophyType 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
    • getDropName

      public String getDropName()
    • getBlockMaterial

      public org.bukkit.Material getBlockMaterial()
      Get the material of the block that would drop this trophy
      Returns:
      the block material
    • getBlockName

      public String getBlockName()
      Get the human-readable name of the block that drops this trophy
      Returns:
      the block name
    • getShortName

      public String getShortName()
      get a shortened name name (lowercase, without underscores) of this enum value.
      Returns:
      the shortened name
    • getDropConfigName

      public String getDropConfigName()
      get the config entry key that corresponds to the droprate for this trophy
      Returns:
      the config key name
    • resolveOreVariant

      public static org.bukkit.Material resolveOreVariant(org.bukkit.Material mat)
    • get

      public static TrophyType get(org.bukkit.Material mat)
      Get the trophytype corresponding to a provided block material
      Parameters:
      mat - the material of a block to drop a trophy when mined
      Returns:
      The type of trophy for that block material, or null if none was found.
    • createDrop

      public org.bukkit.inventory.ItemStack createDrop()
      Creates a new itemstack of this trophy type
      Returns:
      the itemstack
    • getIdentifyingLore

      public String getIdentifyingLore()
    • identifyTrophyLore

      public static TrophyType identifyTrophyLore(String loreLine)
    • identifyTrophyItem

      public static TrophyType identifyTrophyItem(org.bukkit.inventory.ItemStack stack)
    • getLore

      public List<String> getLore()
    • createDrop

      public org.bukkit.inventory.ItemStack createDrop(boolean addenchants, boolean addeffects, boolean addlore)
      Creates a new itemstack of this trophy type
      Parameters:
      addenchants - controls whether to add default enchantments to the trophy item
      addeffects - controls whether to add default potion effects to the trophy item
      addlore - controls whether to add lore-text to the trophy item
      Returns:
      the itemstack