Class ItemTool

java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.itemtype.ItemTool
Direct Known Subclasses:
ItemFlintAndSteel, ItemHoe, ItemShovel

public class ItemTool extends ItemType
  • Constructor Details

    • ItemTool

      public ItemTool()
  • Method Details

    • rightClickBlock

      public final void rightClickBlock(GlowPlayer player, GlowBlock target, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc, org.bukkit.inventory.EquipmentSlot hand)
      Description copied from class: ItemType
      Called when a player right-clicks on a block while holding this item.
      Overrides:
      rightClickBlock in class ItemType
      Parameters:
      player - The player
      target - The block the player right-clicked
      face - The face on which the click occurred
      holding - The ItemStack the player was holding
      clickedLoc - The coordinates at which the click occurred
      hand - The hand slot of this item
    • onToolRightClick

      protected boolean onToolRightClick(GlowPlayer player, GlowBlock target, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc, org.bukkit.inventory.EquipmentSlot hand)
      Called when a player used (right clicked with) the tool.
      Parameters:
      player - The player using the tool
      target - The block right clicked with the tool
      face - The clicked BlockFace
      holding - The tool
      clickedLoc - The click location on the block
      hand - The hand slot of this item
      Returns:
      true if the tool's durability should be decreased, false otherwise