Class CraftBukkitNBTTagger

java.lang.Object
dk.lockfuglsang.minecraft.nbt.CraftBukkitNBTTagger
All Implemented Interfaces:
NBTItemStackTagger

public class CraftBukkitNBTTagger extends Object implements NBTItemStackTagger
An NBTItemStackTagger using reflection for CraftBukkit based servers.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    addNBTTag​(org.bukkit.inventory.ItemStack itemStack, String nbtTagString)
    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 nbtTagString)
    Returns a copy of the itemStack with the supplied nbtTagString applied.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CraftBukkitNBTTagger

      public CraftBukkitNBTTagger()
  • Method Details

    • getNBTTag

      public String getNBTTag(org.bukkit.inventory.ItemStack itemStack)
      Description copied from interface: NBTItemStackTagger
      Returns the NBTTag of the itemStack as a string, or the empty-string if none was found.
      Specified by:
      getNBTTag in interface NBTItemStackTagger
      Parameters:
      itemStack - A Bukkit ItemStack
      Returns:
      the NBTTag
    • setNBTTag

      public org.bukkit.inventory.ItemStack setNBTTag(org.bukkit.inventory.ItemStack itemStack, String nbtTagString)
      Description copied from interface: NBTItemStackTagger
      Returns a copy of the itemStack with the supplied nbtTagString applied.
      Specified by:
      setNBTTag in interface NBTItemStackTagger
      Parameters:
      itemStack - A Bukkit ItemStack
      nbtTagString - A valid NBTTag string
      Returns:
      a copy of the itemStack
    • addNBTTag

      public org.bukkit.inventory.ItemStack addNBTTag(org.bukkit.inventory.ItemStack itemStack, String nbtTagString)
      Description copied from interface: NBTItemStackTagger
      Returns a copy of the itemStack with the supplied nbtTagString applied.
      Specified by:
      addNBTTag in interface NBTItemStackTagger
      Parameters:
      itemStack - A Bukkit ItemStack
      nbtTagString - A valid NBTTag string
      Returns:
      a copy of the itemStack