Class ItemCrossbow

All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable

@Since("1.6.0.0-PNX") public class ItemCrossbow extends ItemTool
  • Constructor Details

    • ItemCrossbow

      @Since("1.4.0.0-PN") public ItemCrossbow()
    • ItemCrossbow

      @Since("1.4.0.0-PN") public ItemCrossbow(Integer meta)
    • ItemCrossbow

      @Since("1.4.0.0-PN") public ItemCrossbow(Integer meta, int count)
  • Method Details

    • getMaxDurability

      @Since("1.6.0.0-PN") public int getMaxDurability()
      Overrides:
      getMaxDurability in class Item
    • onUse

      @Since("1.6.0.0-PNX") public boolean onUse(Player player, int ticksUsed)
      Overrides:
      onUse in class Item
    • canLoad

      @Since("1.6.0.0-PNX") protected boolean canLoad(Item item)
    • onClickAir

      @Since("1.6.0.0-PNX") public boolean onClickAir(Player player, Vector3 directionVector)
      Description copied from class: Item
      Called when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.
      Overrides:
      onClickAir in class Item
      Parameters:
      player - player
      directionVector - direction
      Returns:
      item changed
    • onRelease

      @Since("1.6.0.0-PNX") public boolean onRelease(Player player, int ticksUsed)
      Description copied from class: Item
      Allows the item to execute code when the player releases the item after long clicking it.
      Overrides:
      onRelease in class Item
      Parameters:
      player - The player who released the click button
      ticksUsed - How many ticks the item was held.
      Returns:
      If an inventory contents update should be sent to the player
    • loadArrow

      @Since("1.6.0.0-PNX") public void loadArrow(Player player, Item arrow)
    • useArrow

      @Since("1.6.0.0-PNX") public void useArrow(Player player)
    • isLoaded

      @Since("1.6.0.0-PNX") public boolean isLoaded()
    • launchArrow

      @Since("1.6.0.0-PNX") public boolean launchArrow(Player player)
    • getEnchantAbility

      public int getEnchantAbility()
      Overrides:
      getEnchantAbility in class ItemTool