Interface NBTItemStackTagger

All Known Implementing Classes:
CraftBukkitNBTTagger

public interface NBTItemStackTagger
Interface for allowing depencency injection for testing (and other platforms than CraftBukkit).
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    addNBTTag​(org.bukkit.inventory.ItemStack itemStack, String tag)
    Returns a copy of the itemStack with the supplied nbtTagString applied.
    getNBTTag​(org.bukkit.inventory.ItemStack itemStack)
    Returns the NBTTag of the itemStack as a string, or the empty-string if none was found.
    org.bukkit.inventory.ItemStack
    setNBTTag​(org.bukkit.inventory.ItemStack itemStack, String tag)
    Returns a copy of the itemStack with the supplied nbtTagString applied.
  • Method Details

    • getNBTTag

      String getNBTTag(org.bukkit.inventory.ItemStack itemStack)
      Returns the NBTTag of the itemStack as a string, or the empty-string if none was found.
      Parameters:
      itemStack - A Bukkit ItemStack
      Returns:
      the NBTTag
      Since:
      1.7.2
    • setNBTTag

      org.bukkit.inventory.ItemStack setNBTTag(org.bukkit.inventory.ItemStack itemStack, String tag)
      Returns a copy of the itemStack with the supplied nbtTagString applied.
      Parameters:
      itemStack - A Bukkit ItemStack
      tag - A valid NBTTag string
      Returns:
      a copy of the itemStack
      Since:
      1.7.2
    • addNBTTag

      org.bukkit.inventory.ItemStack addNBTTag(org.bukkit.inventory.ItemStack itemStack, String tag)
      Returns a copy of the itemStack with the supplied nbtTagString applied.
      Parameters:
      itemStack - A Bukkit ItemStack
      tag - A valid NBTTag string
      Returns:
      a copy of the itemStack
      Since:
      1.7.2