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 void expandStack​(org.bukkit.inventory.ItemStack item, boolean infinite, boolean overrideStackSize)
    Expand a stack of items.
    static com.sk89q.worldedit.blocks.BaseItem getCommandItem​(java.lang.String name)  
    static com.sk89q.worldedit.blocks.BaseItem getItem​(java.lang.String name)
    Returns a matched item.
    static org.bukkit.DyeColor matchDyeColor​(java.lang.String filter)
    Attempt to match a dye color for sheep wool.

    Methods inherited from class java.lang.Object

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

  • 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.CommandException
      Attempt to match a dye color for sheep wool.
      Parameters:
      filter -
      Returns:
      Throws:
      com.sk89q.minecraft.util.commands.CommandException