程序包 org.bukkit.entity

# 接口 Arrow

所有超级接口:
  `AbstractArrow`, `CommandSender`, `Entity`, `Metadatable`, `Nameable`, `Permissible`, `PersistentDataHolder`, `Projectile`, `ServerOperator`

所有已知子接口:
  `TippedArrow`

public interface Arrow extends AbstractArrow
表示一只箭矢.

- ## 嵌套类概要

  ## 从接口继承的嵌套类/接口 org.bukkit.entity.AbstractArrow

  `AbstractArrow.PickupStatus`

  ## 从接口继承的嵌套类/接口 org.bukkit.entity.Entity

  `Entity.Spigot`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `boolean`
  `addCustomEffect(@NotNull PotionEffect effect, boolean overwrite)`
  Adds a custom potion effect to this arrow.
  `void`
  `clearCustomEffects()`
  Removes all custom potion effects from this arrow.
  `@Nullable PotionData`
  `getBasePotionData()`
  已过时。
  Upgraded / extended potions are now their own `PotionType` use `getBasePotionType()` instead.
  `@Nullable PotionType`
  `getBasePotionType()`
  Returns the potion type about the base potion
  `@Nullable Color`
  `getColor()`
  Gets the color of this arrow.
  `@NotNull List<PotionEffect>`
  `getCustomEffects()`
  Gets an immutable list containing all custom potion effects applied to this arrow.
  `boolean`
  `hasCustomEffect(@Nullable PotionEffectType type)`
  Checks for a specific custom potion effect type on this arrow.
  `boolean`
  `hasCustomEffects()`
  Checks for the presence of custom potion effects.
  `boolean`
  `removeCustomEffect(@NotNull PotionEffectType type)`
  Removes a custom potion effect from this arrow.
  `void`
  `setBasePotionData(@Nullable PotionData data)`
  已过时。
  Upgraded / extended potions are now their own `PotionType` use `setBasePotionType(org.bukkit.potion.PotionType)` instead.
  `void`
  `setBasePotionType(@Nullable PotionType type)`
  Sets the underlying potion type
  `void`
  `setColor(@Nullable Color color)`
  Sets the color of this arrow.

  ### 从接口继承的方法 org.bukkit.entity.AbstractArrow

  `getAttachedBlock, getDamage, getItem, getKnockbackStrength, getPickupStatus, getPierceLevel, getWeapon, isCritical, isInBlock, isShotFromCrossbow, setCritical, setDamage, setItem, setKnockbackStrength, setPickupStatus, setPierceLevel, setShotFromCrossbow, setWeapon`

  ### 从接口继承的方法 org.bukkit.command.CommandSender

  `getName, sendMessage, sendMessage, sendMessage, sendMessage`

  ### 从接口继承的方法 org.bukkit.entity.Entity

  `addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport`

  ### 从接口继承的方法 org.bukkit.metadata.Metadatable

  `getMetadata, hasMetadata, removeMetadata, setMetadata`

  ### 从接口继承的方法 org.bukkit.Nameable

  `getCustomName, setCustomName`

  ### 从接口继承的方法 org.bukkit.permissions.Permissible

  `addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment`

  ### 从接口继承的方法 org.bukkit.persistence.PersistentDataHolder

  `getPersistentDataContainer`

  ### 从接口继承的方法 org.bukkit.entity.Projectile

  `doesBounce, getShooter, setBounce, setShooter`

  ### 从接口继承的方法 org.bukkit.permissions.ServerOperator

  `isOp, setOp`

- ## 方法详细资料

  - ### setBasePotionData

    @Deprecated void setBasePotionData(@Nullable @Nullable PotionData data)
    已过时。
    Upgraded / extended potions are now their own `PotionType` use `setBasePotionType(org.bukkit.potion.PotionType)` instead.
    Sets the underlying potion data
    参数:
      `data` - PotionData to set the base potion state to

  - ### getBasePotionData

    @Nullable @Deprecated @Nullable PotionData getBasePotionData()
    已过时。
    Upgraded / extended potions are now their own `PotionType` use `getBasePotionType()` instead.
    Returns the potion data about the base potion
    返回:
      a PotionData object

  - ### setBasePotionType

    void setBasePotionType(@Nullable @Nullable PotionType type)
    Sets the underlying potion type
    参数:
      `type` - PotionType to set the base potion state to

  - ### getBasePotionType

    @Nullable @Nullable PotionType getBasePotionType()
    Returns the potion type about the base potion
    返回:
      a PotionType object

  - ### getColor

    @Nullable @Nullable Color getColor()
    Gets the color of this arrow.
    返回:
      arrow `Color` or null if not color is set

  - ### setColor

    void setColor(@Nullable @Nullable Color color)
    Sets the color of this arrow. Will be applied as a tint to its particles.
    参数:
      `color` - arrow color, null to clear the color

  - ### hasCustomEffects

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

  - ### getCustomEffects

    @NotNull @NotNull 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(@NotNull @NotNull 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(@NotNull @NotNull 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(@Nullable @Nullable 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