程序包 org.bukkit.entity

# 接口 ItemFrame

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

所有已知子接口:
  `GlowItemFrame`

public interface ItemFrame extends Hanging
代表物品展示框.

- ## 嵌套类概要

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

  `Entity.Spigot`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull ItemStack`
  `getItem()`
  获取在展示框内的物品.
  `float`
  `getItemDropChance()`
  获取在此物品展示框被摧毁时物品掉落的几率.
  `@NotNull Rotation`
  `getRotation()`
  获取展示框内物品的旋转角度.
  `boolean`
  `isFixed()`
  返回物品展示框是否是"固定"的.
  `boolean`
  `isVisible()`
  返回物品展示框是否可见.
  `void`
  `setFixed(boolean fixed)`
  设置物品展示框是否应固定.
  `void`
  `setItem(@Nullable ItemStack item)`
  设置在展示框内的物品.
  `void`
  `setItem(@Nullable ItemStack item, boolean playSound)`
  设置在此物品展示框中的物品.
  `void`
  `setItemDropChance(float chance)`
  设置在此物品展示框被摧毁时物品掉落的几率.
  `void`
  `setRotation(@NotNull Rotation rotation)`
  设置展示框内物品的旋转角度.
  `void`
  `setVisible(boolean visible)`
  设置物品展示框是否可见.

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

  `getAttachedFace`

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

  `getName, sendMessage, sendMessage, sendMessage, sendMessage`

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

  `getFacing, setFacingDirection`

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

  `setFacingDirection`

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

- ## 方法详细资料

  - ### getItem

    @NotNull @NotNull ItemStack getItem()
    获取在展示框内的物品.

    原文:Get the item in this frame

    返回:
      展示框内的物品

  - ### setItem

    void setItem(@Nullable @Nullable ItemStack item)
    设置在展示框内的物品.

    原文:Set the item in this frame

    参数:
      `item` - 新的物品

  - ### setItem

    void setItem(@Nullable @Nullable ItemStack item, boolean playSound)
    设置在此物品展示框中的物品.

    原文: Set the item in this frame

    参数:
      `item` - 新的物品
      `playSound` - 是否播放物品放置的声音

  - ### getItemDropChance

    float getItemDropChance()
    获取在此物品展示框被摧毁时物品掉落的几率.
    - 0.0F的几率将永远不会掉落
    - 1.0F的几率将总是会掉落

    原文: Gets the chance of the item being dropped upon this frame's destruction.

    - A drop chance of 0.0F will never drop
    - A drop chance of 1.0F will always drop
    返回:
      物品掉落的几率

  - ### setItemDropChance

    void setItemDropChance(float chance)
    设置在此物品展示框被摧毁时物品掉落的几率.
    - 0.0F的几率将永远不会掉落
    - 1.0F的几率将总是会掉落

    原文: Sets the chance of the off hand item being dropped upon this frame's destruction.

    - A drop chance of 0.0F will never drop
    - A drop chance of 1.0F will always drop
    参数:
      `chance` - 物品掉落的几率

  - ### getRotation

    @NotNull @NotNull Rotation getRotation()
    获取展示框内物品的旋转角度.

    原文:Get the rotation of the frame's item

    返回:
      旋转角度

  - ### setRotation

    void setRotation(@NotNull @NotNull Rotation rotation) throws IllegalArgumentException
    设置展示框内物品的旋转角度.

    原文:Set the rotation of the frame's item

    参数:
      `rotation` - 新的旋转角度
    抛出:
      `IllegalArgumentException` - 如果旋转角度为null

  - ### isVisible

    boolean isVisible()
    返回物品展示框是否可见.

    原文: Returns whether the item frame is be visible or not.

    返回:
      物品展示框是否可见

  - ### setVisible

    void setVisible(boolean visible)
    设置物品展示框是否可见.

    原文: Sets whether the item frame should be visible or not.

    参数:
      `visible` - 物品展示框是否可见

  - ### isFixed

    boolean isFixed()
    返回物品展示框是否是"固定"的. 如果为true, 则无法破坏/移动物品展示框(例如, 由于破坏、交互、活塞或缺少支撑方块), 旋转物品或放置/移除物品.

    原文: Returns whether the item frame is "fixed" or not. When true it's not possible to destroy/move the frame (e.g. by damage, interaction, pistons, or missing supporting blocks), rotate the item or place/remove items.

    返回:
      物品展示框是否固定

  - ### setFixed

    void setFixed(boolean fixed)
    设置物品展示框是否应固定. 当设置为true时, 不可能破坏/移动物品展示框(例如, 由于破坏、交互、活塞或缺少支撑方块), 旋转物品或放置/移除物品.

    原文: Sets whether the item frame should be fixed or not. When set to true it's not possible to destroy/move the frame (e.g. by damage, interaction, pistons, or missing supporting blocks), rotate the item or place/remove items.

    参数:
      `fixed` - 物品展示框是否固定