Package com.sk89q.commandbook.util.item
Class ItemUtil
java.lang.Object
com.sk89q.commandbook.util.item.ItemUtil
public class ItemUtil
extends java.lang.Object
Various item helper methods that do not depend on user-configurable information.
-
Constructor Summary
Constructors Constructor Description ItemUtil() -
Method Summary
Modifier and Type Method Description static voidexpandStack(org.bukkit.inventory.ItemStack item, boolean infinite, boolean overrideStackSize)Expand a stack of items.static com.sk89q.worldedit.blocks.BaseItemgetCommandItem(java.lang.String name)static com.sk89q.worldedit.blocks.BaseItemgetItem(java.lang.String name)Returns a matched item.static org.bukkit.DyeColormatchDyeColor(java.lang.String filter)Attempt to match a dye color for sheep wool.
-
Constructor Details
-
ItemUtil
public ItemUtil()
-
-
Method Details
-
getItem
public static com.sk89q.worldedit.blocks.BaseItem getItem(java.lang.String name)Returns a matched item.- Parameters:
name- The name to match- Returns:
- item
- See Also:
getCommandItem(String)
-
getCommandItem
public static com.sk89q.worldedit.blocks.BaseItem getCommandItem(java.lang.String name) throws com.sk89q.minecraft.util.commands.CommandException- Throws:
com.sk89q.minecraft.util.commands.CommandException
-
expandStack
public static void expandStack(org.bukkit.inventory.ItemStack item, boolean infinite, boolean overrideStackSize)Expand a stack of items.- Parameters:
item-infinite-
-
matchDyeColor
public static org.bukkit.DyeColor matchDyeColor(java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandExceptionAttempt to match a dye color for sheep wool.- Parameters:
filter-- Returns:
- Throws:
com.sk89q.minecraft.util.commands.CommandException
-