程序包 org.bukkit.entity

# 接口 EnderSignal

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

public interface EnderSignal extends Entity
代表抛出的末影之眼.

- ## 嵌套类概要

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

  `Entity.Spigot`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `int`
  `getDespawnTimer()`
  获取末影之眼已在空气漂浮的时间 (单位为tick).
  `boolean`
  `getDropItem()`
  获取末影之眼最终是否会掉落为物品.
  如果为true, 将为掉落为物品, 反之它会破碎并湮灭.
  `@NotNull ItemStack`
  `getItem()`
  Get the `ItemStack` to be displayed while in the air and to be dropped on death.
  `@NotNull Location`
  `getTargetLocation()`
  获取末影之眼移向的位置.
  `void`
  `setDespawnTimer(int timer)`
  设置末影之眼已在空气漂浮的时间 (单位为tick).
  `void`
  `setDropItem(boolean drop)`
  设置末影之眼最终是否会掉落为物品, 亦或是湮灭于空气中.
  `void`
  `setItem(@Nullable ItemStack item)`
  Set the `ItemStack` to be displayed while in the air and to be dropped on death.
  `void`
  `setTargetLocation(@NotNull Location location)`
  设置末影之眼移向的位置.

  ### 从接口继承的方法 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.permissions.ServerOperator

  `isOp, setOp`

- ## 方法详细资料

  - ### getTargetLocation

    @NotNull @NotNull Location getTargetLocation()
    获取末影之眼移向的位置.

    原文:Get the location this EnderSignal is moving towards.

    返回:
      末影之眼移向的`位置`

  - ### setTargetLocation

    void setTargetLocation(@NotNull @NotNull Location location)
    设置末影之眼移向的位置.
    当设置了新的目标地点时, `getDropItem()`将被重置为一个随机值 , 其消失时间将重置为0.

    原文:Set the `Location` this EnderSignal is moving towards.
    When setting a new target location, the `getDropItem()` resets to a random value and the despawn timer gets set back to 0.

    参数:
      `location` - 新目标位置

  - ### getDropItem

    boolean getDropItem()
    获取末影之眼最终是否会掉落为物品.
    如果为true, 将为掉落为物品, 反之它会破碎并湮灭.

    原文:Gets if the EnderSignal should drop an item on death.
    If `true`, it will drop an item. If `false`, it will shatter.

    返回:
      末影之眼最终是否会掉落为物品

  - ### setDropItem

    void setDropItem(boolean drop)
    设置末影之眼最终是否会掉落为物品, 亦或是湮灭于空气中.

    原文:Sets if the EnderSignal should drop an item on death; or if it should shatter.

    参数:
      `drop` - 末影之眼最终是否会掉落为物品

  - ### getItem

    @NotNull @NotNull ItemStack getItem()
    Get the `ItemStack` to be displayed while in the air and to be dropped on death.
    返回:
      the item stack

  - ### setItem

    void setItem(@Nullable @Nullable ItemStack item)
    Set the `ItemStack` to be displayed while in the air and to be dropped on death.
    参数:
      `item` - the item to set. If null, resets to the default eye of ender

  - ### getDespawnTimer

    int getDespawnTimer()
    获取末影之眼已在空气漂浮的时间 (单位为tick).
    当此值大于80时, 此实体会在下一tick消失, 是否掉落为物品取决于getDropItem().

    原文:Gets the amount of time this entity has been alive (in ticks).
    When this number is greater than 80, it will despawn on the next tick.

    返回:
      此末影之眼实体已存活时间

  - ### setDespawnTimer

    void setDespawnTimer(int timer)
    设置末影之眼已在空气漂浮的时间 (单位为tick).
    当此值大于80时, 此实体会在下一tick消失, 是否掉落为物品取决于getDropItem().

    原文:Set how long this entity has been alive (in ticks).
    When this number is greater than 80, it will despawn on the next tick.

    参数:
      `timer` - 此末影之眼实体已存活时间