From f791e2726f0d7a71fd5e0755ae97e8c432ced592 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Wed, 9 Jan 2013 04:52:53 +0100 Subject: [PATCH] Inform about the purpose of the fromItemStack (fromItemTag) method. --- .../com/comphenix/protocol/wrappers/nbt/NbtFactory.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtFactory.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtFactory.java index 4c932ade..6ae15713 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtFactory.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/NbtFactory.java @@ -112,14 +112,16 @@ public class NbtFactory { } /** - * Construct a wrapper for an NBT tag stored (in memory) in an item stack. + * Construct a wrapper for an NBT tag stored (in memory) in an item stack. This is where + * auxillary data such as enchanting, name and lore is stored. It doesn't include the items + * material, damage value or count. *

* The item stack must be a wrapper for a CraftItemStack. Use * {@link MinecraftReflection#getBukkitItemStack(ItemStack)} if not. * @param stack - the item stack. * @return A wrapper for its NBT tag. */ - public static NbtWrapper fromItemStack(ItemStack stack) { + public static NbtWrapper fromItemTag(ItemStack stack) { if (!MinecraftReflection.isCraftItemStack(stack)) throw new IllegalArgumentException("Stack must be a CraftItemStack.");