Package net.glowstone.block.itemtype
Class ItemTool
java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.itemtype.ItemTool
- Direct Known Subclasses:
ItemFlintAndSteel,ItemHoe,ItemShovel
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.block.itemtype.ItemType
ItemType.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanonToolRightClick(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.final voidrightClickBlock(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 right-clicks on a block while holding this item.Methods inherited from class net.glowstone.block.itemtype.ItemType
getContext, getMaterial, getMaterials, getMaxStackSize, getPlaceAs, rightClickAir, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
-
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:ItemTypeCalled when a player right-clicks on a block while holding this item.- Overrides:
rightClickBlockin classItemType- Parameters:
player- The playertarget- The block the player right-clickedface- The face on which the click occurredholding- The ItemStack the player was holdingclickedLoc- The coordinates at which the click occurredhand- 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 tooltarget- The block right clicked with the toolface- The clicked BlockFaceholding- The toolclickedLoc- The click location on the blockhand- The hand slot of this item- Returns:
- true if the tool's durability should be decreased, false otherwise
-