Interface PiercingWeaponComponent

All Superinterfaces:
ConfigurationSerializable

@Experimental public interface PiercingWeaponComponent extends ConfigurationSerializable
Represents a component which can turn any item into piercing weapon that damages multiple entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the sound to play when the item successfully hits a target.
    Gets the sound to play when the item is used.
    boolean
    Gets whether the attack deals knockback to the target.
    boolean
    Gets whether the attack dismounts the target.
    void
    setDealsKnockback(boolean knockback)
    Sets whether the attack deals knockback to the target.
    void
    setDismounts(boolean dismounts)
    Sets whether the attack dismounts the target.
    void
    Sets the sound to play when the item successfully hits a target.
    void
    setSound(Sound sound)
    Sets the sound to play when the item is used.

    Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable

    serialize
  • Method Details

    • isDealsKnockback

      boolean isDealsKnockback()
      Gets whether the attack deals knockback to the target.
      Returns:
      true if knockback
    • setDealsKnockback

      void setDealsKnockback(boolean knockback)
      Sets whether the attack deals knockback to the target.
      Parameters:
      knockback - true if knockback
    • isDismounts

      boolean isDismounts()
      Gets whether the attack dismounts the target.
      Returns:
      true if dismounts
    • setDismounts

      void setDismounts(boolean dismounts)
      Sets whether the attack dismounts the target.
      Parameters:
      dismounts - true if dismounts
    • getSound

      @Nullable Sound getSound()
      Gets the sound to play when the item is used.
      Returns:
      the sound
    • setSound

      void setSound(@Nullable Sound sound)
      Sets the sound to play when the item is used.
      Parameters:
      sound - sound or null for current default
    • getHitSound

      @Nullable Sound getHitSound()
      Gets the sound to play when the item successfully hits a target.
      Returns:
      the sound
    • setHitSound

      void setHitSound(@Nullable Sound sound)
      Sets the sound to play when the item successfully hits a target.
      Parameters:
      sound - sound or null for current default