ItemType.Context
Constructor and Description |
---|
ItemTimedUsage() |
Modifier and Type | Method and Description |
---|---|
void |
endUse(GlowPlayer player,
org.bukkit.inventory.ItemStack item) |
ItemType.Context |
getContext()
Get 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.
|
void |
startUse(GlowPlayer player,
org.bukkit.inventory.ItemStack item) |
getId, getMaterial, getMaxStackSize, getPlaceAs, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
public ItemType.Context getContext()
ItemType
getContext
in class ItemType
ItemType.Context.BLOCK
}public void rightClickAir(GlowPlayer player, org.bukkit.inventory.ItemStack holding)
ItemType
rightClickAir
in class ItemType
player
- The playerholding
- The ItemStack the player was holdingpublic 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)
ItemType
rightClickBlock
in class ItemType
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 itempublic void startUse(GlowPlayer player, org.bukkit.inventory.ItemStack item)
public void endUse(GlowPlayer player, org.bukkit.inventory.ItemStack item)
Copyright © 2021. All rights reserved.