Package net.glowstone.block.itemtype
Class ItemBucket
java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.itemtype.ItemBucket
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.block.itemtype.ItemType
ItemType.Context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the context this item can be used in.void
rightClickAir
(GlowPlayer player, org.bukkit.inventory.ItemStack holding) Called when a player right-clicks in midair while holding this item.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) Called when a player right-clicks on a block while holding this item.Methods inherited from class net.glowstone.block.itemtype.ItemType
getMaterial, getMaterials, getMaxStackSize, getPlaceAs, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
-
Constructor Details
-
ItemBucket
public ItemBucket()
-
-
Method Details
-
getContext
Description copied from class:ItemType
Get the context this item can be used in.- Overrides:
getContext
in classItemType
- Returns:
- context of the item, default is {
ItemType.Context.BLOCK
}
-
rightClickAir
Description copied from class:ItemType
Called when a player right-clicks in midair while holding this item. Also called by default if rightClickBlock is not overridden.- Overrides:
rightClickAir
in classItemType
- Parameters:
player
- The playerholding
- The ItemStack the player was holding
-
rightClickBlock
public 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 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
-