程序包 org.bukkit.entity

# 接口 Item

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

public interface Item extends Entity
代表掉落物实体.

- ## 嵌套类概要

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

  `Entity.Spigot`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull ItemStack`
  `getItemStack()`
  获取与此掉落物相关的物品堆.
  `@Nullable UUID`
  `getOwner()`
  Get the owner of this item.
  `int`
  `getPickupDelay()`
  获取此掉落物剩余的不可被捡起的时间.
  `@Nullable UUID`
  `getThrower()`
  Get the thrower of this item.
  `boolean`
  `isUnlimitedLifetime()`
  Gets if this Item lives forever
  `void`
  `setItemStack(@NotNull ItemStack stack)`
  设置与此掉落物相关的物品堆.
  `void`
  `setOwner(@Nullable UUID owner)`
  Sets the owner of this item.
  `void`
  `setPickupDelay(int delay)`
  设置掉落物剩余的不可被捡起的时间.
  `void`
  `setThrower(@Nullable UUID uuid)`
  Set the thrower of this item.
  `void`
  `setUnlimitedLifetime(boolean unlimited)`
  Sets if this Item should live forever

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

- ## 方法详细资料

  - ### getItemStack

    @NotNull @NotNull ItemStack getItemStack()
    获取与此掉落物相关的物品堆.

    原文:Gets the item stack associated with this item drop.

    返回:
      物品堆

  - ### setItemStack

    void setItemStack(@NotNull @NotNull ItemStack stack)
    设置与此掉落物相关的物品堆.

    原文:Sets the item stack associated with this item drop.

    参数:
      `stack` - 物品堆

  - ### getPickupDelay

    int getPickupDelay()
    获取此掉落物剩余的不可被捡起的时间.

    原文:Gets the delay before this Item is available to be picked up by players

    返回:
      掉落物剩余的不可被捡起的时间

  - ### setPickupDelay

    void setPickupDelay(int delay)
    设置掉落物剩余的不可被捡起的时间.

    原文:Sets the delay before this Item is available to be picked up by players

    参数:
      `delay` - 掉落物剩余的不可被捡起的时间

  - ### setUnlimitedLifetime

    void setUnlimitedLifetime(boolean unlimited)
    Sets if this Item should live forever
    参数:
      `unlimited` - true if the lifetime is unlimited

  - ### isUnlimitedLifetime

    boolean isUnlimitedLifetime()
    Gets if this Item lives forever
    返回:
      true if the lifetime is unlimited

  - ### setOwner

    void setOwner(@Nullable @Nullable UUID owner)
    Sets the owner of this item. Other entities will not be able to pickup this item when an owner is set.
    参数:
      `owner` - UUID of new owner

  - ### getOwner

    @Nullable @Nullable UUID getOwner()
    Get the owner of this item.
    返回:
      UUID of owner

  - ### setThrower

    void setThrower(@Nullable @Nullable UUID uuid)
    Set the thrower of this item. The thrower is the entity which dropped the item. This affects the trigger criteria for item pickups, for things such as advancements.
    参数:
      `uuid` - UUID of thrower

  - ### getThrower

    @Nullable @Nullable UUID getThrower()
    Get the thrower of this item. The thrower is the entity which dropped the item.
    返回:
      UUID of thrower