接口 TippedArrow

所有超级接口:
Arrow, CommandSender, Entity, Metadatable, Nameable, Permissible, Projectile, ServerOperator

public interface TippedArrow extends Arrow
  • 方法详细资料

    • setBasePotionData

      void setBasePotionData(PotionData data)
      Sets the underlying potion data
      参数:
      data - PotionData to set the base potion state to
    • getBasePotionData

      PotionData getBasePotionData()
      Returns the potion data about the base potion
      返回:
      a PotionData object
    • getColor

      Color getColor()
      Gets the color of this arrow.
      返回:
      arrow color
    • setColor

      void setColor(Color color)
      Sets the color of this arrow. Will be applied as a tint to its particles.
      参数:
      color - arrow color
    • hasCustomEffects

      boolean hasCustomEffects()
      Checks for the presence of custom potion effects.
      返回:
      true if custom potion effects are applied
    • getCustomEffects

      List<PotionEffect> getCustomEffects()
      Gets an immutable list containing all custom potion effects applied to this arrow.

      Plugins should check that hasCustomEffects() returns true before calling this method.

      返回:
      the immutable list of custom potion effects
    • addCustomEffect

      boolean addCustomEffect(PotionEffect effect, boolean overwrite)
      Adds a custom potion effect to this arrow.
      参数:
      effect - the potion effect to add
      overwrite - true if any existing effect of the same type should be overwritten
      返回:
      true if the effect was added as a result of this call
    • removeCustomEffect

      boolean removeCustomEffect(PotionEffectType type)
      Removes a custom potion effect from this arrow.
      参数:
      type - the potion effect type to remove
      返回:
      true if the an effect was removed as a result of this call
      抛出:
      IllegalArgumentException - if this operation would leave the Arrow in a state with no Custom Effects and PotionType.UNCRAFTABLE
    • hasCustomEffect

      boolean hasCustomEffect(PotionEffectType type)
      Checks for a specific custom potion effect type on this arrow.
      参数:
      type - the potion effect type to check for
      返回:
      true if the potion has this effect
    • clearCustomEffects

      void clearCustomEffects()
      Removes all custom potion effects from this arrow.
      抛出:
      IllegalArgumentException - if this operation would leave the Arrow in a state with no Custom Effects and PotionType.UNCRAFTABLE