Interface ItemConverter


public interface ItemConverter
  • Method Details

    • getItemKey

      String getItemKey(org.bukkit.inventory.ItemStack item)
    • getTag

      String getTag(org.bukkit.inventory.ItemStack item)
    • getNameColor

      org.bukkit.ChatColor getNameColor(org.bukkit.inventory.ItemStack item)
    • getTranslationKey

      String getTranslationKey(org.bukkit.inventory.ItemStack item)
    • getTranslateWith

      List<String> getTranslateWith(org.bukkit.inventory.ItemStack item)
    • getCustomName

      String getCustomName(org.bukkit.inventory.ItemStack item)
    • createComponent

      default Component createComponent(org.bukkit.inventory.ItemStack item, Level debugLevel) throws ItemDataTooLongException, IllegalArgumentException
      Create a new component for displaying of the item message. Will check the cache and add to it.
      Parameters:
      item - The item that this component should represent
      debugLevel - The level at which debug messages should be printed at
      Returns:
      The Component
      Throws:
      ItemDataTooLongException - Thrown if the item data is too long to fit in a packet
      IllegalArgumentException - Thrown if the item data was not able to be obtained
    • createComponent

      Component createComponent(@Nullable @Nullable UUID senderId, @Nullable @Nullable String senderName, org.bukkit.inventory.ItemStack item, Level debugLevel) throws ItemDataTooLongException, IllegalArgumentException
      Create a new component for the message of a player displaying an item. Will check the cache and add to it.
      Parameters:
      senderId - The UUID of the player that sent the item
      senderName - The name of the player that sent the item
      item - The item that this component should represent
      debugLevel - The level at which debug messages should be printed at
      Returns:
      The Component
      Throws:
      ItemDataTooLongException - Thrown if the item data is too long to fit in a packet
      IllegalArgumentException - Thrown if the item data was not able to be obtained