Interface Trident

All Superinterfaces:
AbstractArrow, Audience, CommandSender, Entity, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, Projectile, ServerOperator, Sound.Emitter, ThrowableProjectile

public interface Trident extends AbstractArrow, ThrowableProjectile
Represents a thrown trident.
  • Method Details

    • hasGlint

      boolean hasGlint()
      Returns whether the trident has an enchanted glow. This can be separate from the underlying item having any enchantments.
      Returns:
      whether the trident has an enchanted glow
    • setGlint

      void setGlint(boolean glint)
      Sets whether the trident has an enchanted glow. This is separate from the underlying item having any enchantments.
      Parameters:
      glint - whether the trident should have an enchanted glow
    • getLoyaltyLevel

      int getLoyaltyLevel()
      Returns the loyalty level of the trident. This can be separate from the underlying item's enchantments.
      Returns:
      loyalty level of the trident
    • setLoyaltyLevel

      void setLoyaltyLevel(int loyaltyLevel)
      Sets the loyalty level of the trident. This is separate from the underlying item's enchantments.
      Parameters:
      loyaltyLevel - loyalty level
      Throws:
      IllegalArgumentException - if the loyalty level is lower than 0 or greater than 127
    • hasDealtDamage

      boolean hasDealtDamage()
      Gets if this trident has dealt damage to an entity yet or has hit the floor. If neither of these events have occurred yet, this will return false.
      Returns:
      has dealt damage
    • setHasDealtDamage

      void setHasDealtDamage(boolean hasDealtDamage)
      Sets if this trident has dealt damage to an entity yet or has hit the floor.
      Parameters:
      hasDealtDamage - has dealt damage or hit the floor
    • setDamage

      void setDamage(double damage)
      Sets the base amount of damage this trident will do.
      Specified by:
      setDamage in interface AbstractArrow
      Parameters:
      damage - new damage amount
    • getDamage

      double getDamage()
      Gets the base amount of damage this trident will do. Defaults to 8.0 for a normal trident with 0.5 * (1 + power level) added for trident fired from damage enchanted bows.
      Specified by:
      getDamage in interface AbstractArrow
      Returns:
      base damage amount