Class EnchantmentTableInventory

All Implemented Interfaces:
InventoryClickHandler, Taggable, TagReadable, TagWritable, Viewable

public class EnchantmentTableInventory extends Inventory
  • Constructor Details Link icon

    • EnchantmentTableInventory Link icon

      public EnchantmentTableInventory(@NotNull @NotNull Component title)
  • Method Details Link icon

    • getLevelRequirement Link icon

      public short getLevelRequirement(EnchantmentTableInventory.EnchantmentSlot enchantmentSlot)
      Gets the level requirement in a slot.
      Parameters:
      enchantmentSlot - the slot to check the level requirement
      Returns:
      the level requirement of the slot
    • setLevelRequirement Link icon

      public void setLevelRequirement(EnchantmentTableInventory.EnchantmentSlot enchantmentSlot, short level)
      Sets the level requirement of a slot.
      Parameters:
      enchantmentSlot - the slot
      level - the level
    • getSeed Link icon

      public short getSeed()
      Gets the enchantment seed.
      Returns:
      the enchantment seed
    • setSeed Link icon

      public void setSeed(short seed)
      Sets the enchantment seed.
      Parameters:
      seed - the enchantment seed
    • getEnchantmentShown Link icon

      public Enchantment getEnchantmentShown(EnchantmentTableInventory.EnchantmentSlot enchantmentSlot)
      Gets the enchantment shown in a slot.
      Parameters:
      enchantmentSlot - the enchantment slot
      Returns:
      the enchantment shown in the slot, null if it is hidden
    • setEnchantmentShown Link icon

      public void setEnchantmentShown(EnchantmentTableInventory.EnchantmentSlot enchantmentSlot, Enchantment enchantment)
      Sets the enchantment shown in a slot.

      Can be set to null to hide it.

      Parameters:
      enchantmentSlot - the enchantment slot
      enchantment - the enchantment
    • getEnchantmentLevel Link icon

      public short getEnchantmentLevel(EnchantmentTableInventory.EnchantmentSlot enchantmentSlot)
      Gets the enchantment level shown on mouse hover.
      Parameters:
      enchantmentSlot - the enchantment slot
      Returns:
      the level shown, -1 if no enchant
    • setEnchantmentLevel Link icon

      public void setEnchantmentLevel(EnchantmentTableInventory.EnchantmentSlot enchantmentSlot, short level)
      Sets the enchantment level shown on mouse hover.

      Can be set to -1 if no enchant.

      Parameters:
      enchantmentSlot - the enchantment slot
      level - the level shown