Class ItemTrident

All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable

public class ItemTrident extends ItemTool
Author:
PetteriM1
  • Constructor Details

    • ItemTrident

      public ItemTrident()
    • ItemTrident

      public ItemTrident(Integer meta)
    • ItemTrident

      public ItemTrident(Integer meta, int count)
  • Method Details

    • getMaxDurability

      public int getMaxDurability()
      Overrides:
      getMaxDurability in class Item
    • getAttackDamage

      public int getAttackDamage()
      Overrides:
      getAttackDamage in class Item
    • onClickAir

      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

      @PowerNukkitDifference(info="Using new method to play sounds", since="1.4.0.0-PN") 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