com.quartercode.quarterbukkit.api
Class TagUtil

java.lang.Object
  extended by com.quartercode.quarterbukkit.api.TagUtil

public class TagUtil
extends java.lang.Object

Class for modifying NBT-Tags and mutating Packtes easily. This is e.g. for modifying the name of items etc.


Method Summary
static java.util.List<java.lang.String> getDescriptions(org.bukkit.inventory.ItemStack itemStack)
          Returns the description lines of an ItemStack.
static java.lang.String getName(org.bukkit.inventory.ItemStack itemStack)
          Returns the name of an ItemStack.
static void setDescriptions(org.bukkit.inventory.ItemStack itemStack, java.util.List<java.lang.String> descriptions)
          Sets the description lines of an ItemStack.
static void setName(org.bukkit.inventory.ItemStack itemStack, java.lang.String name)
          Sets the name of an ItemStack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public static java.lang.String getName(org.bukkit.inventory.ItemStack itemStack)
Returns the name of an ItemStack.

Parameters:
itemStack - The ItemStack.
Returns:
The name of the ItemStack.

setName

public static void setName(org.bukkit.inventory.ItemStack itemStack,
                           java.lang.String name)
Sets the name of an ItemStack. You can use every chat code.

Parameters:
itemStack - The ItemStack to modify.
name - The name to set.

getDescriptions

public static java.util.List<java.lang.String> getDescriptions(org.bukkit.inventory.ItemStack itemStack)
Returns the description lines of an ItemStack. They equals to the "Lore".

Parameters:
itemStack - The ItemStack.
Returns:
The description lines of the ItemStack as an String-List.

setDescriptions

public static void setDescriptions(org.bukkit.inventory.ItemStack itemStack,
                                   java.util.List<java.lang.String> descriptions)
Sets the description lines of an ItemStack. They equals to the "Lore". You can use every chat code.

Parameters:
itemStack - The ItemStack to modify.
descriptions - The description lines to set as an String-List.