# 枚举的使用
org.bukkit.inventory.EquipmentSlot

使用EquipmentSlot的程序包
程序包
说明
org.bukkit
Bukkit API的顶级程序包, 包含通用的API类和接口.
org.bukkit.attribute
与属性有关的类 (Minecraft Wiki - 属性).
org.bukkit.block.spawner
Classes relevant to mob spawners.
org.bukkit.entity
为在`世界`内存在的非三维像素单位(实体)提供的接口，包含玩家、怪物、抛射物等.
org.bukkit.event.block
与`方块`被改变或与`世界`进行交互等情况相关的`事件`.
org.bukkit.event.entity
与`实体`相关的`事件`，不包括 一些直接引用的更具体的实体类型.
org.bukkit.event.hanging
与`悬挂实体`相关的`事件`.
org.bukkit.event.player
与`玩家`相关的`事件`.
org.bukkit.inventory
参与操作玩家物品栏和物品交互的类.
org.bukkit.inventory.meta
用于操作可以存储在`物品堆`的额外数据的接口.

- ## org.bukkit中EquipmentSlot的使用

  返回EquipmentSlot的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `@NotNull EquipmentSlot`
  Material.`getEquipmentSlot()`
  Get the best suitable slot for this Material.
  参数类型为EquipmentSlot的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Multimap<Attribute,AttributeModifier>`
  Material.`getDefaultAttributeModifiers(@NotNull EquipmentSlot slot)`
  Return an immutable copy of all default `Attribute`s and their `AttributeModifier`s for a given `EquipmentSlot`.
  `Multimap<Attribute,AttributeModifier>`
  UnsafeValues.`getDefaultAttributeModifiers(Material material, EquipmentSlot slot)`
  已过时, 待删除: 此 API 元素将从以后的版本中删除。

- ## org.bukkit.attribute中EquipmentSlot的使用

  返回EquipmentSlot的org.bukkit.attribute中的方法
  修饰符和类型
  方法
  说明
  `@Nullable EquipmentSlot`
  AttributeModifier.`getSlot()`
  已过时。
  请使用 `AttributeModifier.getSlotGroup()`
  参数类型为EquipmentSlot的org.bukkit.attribute中的构造器
  限定符
  构造器
  说明
  ``
  `AttributeModifier(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull AttributeModifier.Operation operation, @Nullable EquipmentSlot slot)`
  已过时。

- ## org.bukkit.block.spawner中EquipmentSlot的使用

  返回变量类型为EquipmentSlot的类型的org.bukkit.block.spawner中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Map<EquipmentSlot,Float>`
  SpawnerEntry.Equipment.`getDropChances()`
  Gets a mutable map of the drop chances for each slot of the entity.
  类型变量类型为EquipmentSlot的org.bukkit.block.spawner中的构造器参数
  限定符
  构造器
  说明
  ``
  `Equipment(@NotNull LootTable equipmentLootTable, @NotNull Map<EquipmentSlot,Float> dropChances)`

- ## org.bukkit.entity中EquipmentSlot的使用

  参数类型为EquipmentSlot的org.bukkit.entity中的方法
  修饰符和类型
  方法
  说明
  `void`
  ArmorStand.`addEquipmentLock(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType)`
  Locks the equipment slot with the specified `locking mechanism`.
  `boolean`
  ArmorStand.`hasEquipmentLock(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType)`
  Returns if the ArmorStand has the specified `locking mechanism`.
  `void`
  ArmorStand.`removeEquipmentLock(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType)`
  Remove a `locking mechanism`.
  `void`
  Player.`sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @Nullable ItemStack item)`
  向玩家发送某个实体的盔甲槽变化数据包.
  类型变量类型为EquipmentSlot的org.bukkit.entity中的方法参数
  修饰符和类型
  方法
  说明
  `void`
  Player.`sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot,ItemStack> items)`
  Send multiple equipment changes for the target entity.

- ## org.bukkit.event.block中EquipmentSlot的使用

  声明为EquipmentSlot的org.bukkit.event.block中的字段
  修饰符和类型
  字段
  说明
  `protected EquipmentSlot`
  BlockPlaceEvent.`hand`
  返回EquipmentSlot的org.bukkit.event.block中的方法
  修饰符和类型
  方法
  说明
  `@NotNull EquipmentSlot`
  BlockPlaceEvent.`getHand()`
  获取放置这个方块的手.
  参数类型为EquipmentSlot的org.bukkit.event.block中的构造器
  限定符
  构造器
  说明
  ``
  `BlockPlaceEvent(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull EquipmentSlot hand)`

- ## org.bukkit.event.entity中EquipmentSlot的使用

  返回EquipmentSlot的org.bukkit.event.entity中的方法
  修饰符和类型
  方法
  说明
  `@NotNull EquipmentSlot`
  EntityPlaceEvent.`getHand()`
  Get the hand used to place the entity.
  `@Nullable EquipmentSlot`
  EntityResurrectEvent.`getHand()`
  Get the hand in which the totem of undying was found, or null if the entity did not have a totem of undying.
  `@NotNull EquipmentSlot`
  EntityShootBowEvent.`getHand()`
  Get the hand from which the bow was shot.
  `@NotNull EquipmentSlot`
  PlayerLeashEntityEvent.`getHand()`
  Returns the hand used by the player to leash the entity.
  参数类型为EquipmentSlot的org.bukkit.event.entity中的构造器
  限定符
  构造器
  说明
  ``
  `EntityPlaceEvent(@NotNull Entity entity, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace, @NotNull EquipmentSlot hand)`
  ``
  `EntityResurrectEvent(@NotNull LivingEntity what, @Nullable EquipmentSlot hand)`
  ``
  `EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @Nullable ItemStack consumable, @NotNull Entity projectile, @NotNull EquipmentSlot hand, float force, boolean consumeItem)`
  ``
  `PlayerLeashEntityEvent(@NotNull Entity what, @NotNull Entity leashHolder, @NotNull Player leasher, @NotNull EquipmentSlot hand)`

- ## org.bukkit.event.hanging中EquipmentSlot的使用

  返回EquipmentSlot的org.bukkit.event.hanging中的方法
  修饰符和类型
  方法
  说明
  `@Nullable EquipmentSlot`
  HangingPlaceEvent.`getHand()`
  Returns the hand that was used to place the hanging entity, or null if a player did not place the hanging entity.
  参数类型为EquipmentSlot的org.bukkit.event.hanging中的构造器
  限定符
  构造器
  说明
  ``
  `HangingPlaceEvent(@NotNull Hanging hanging, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace, @Nullable EquipmentSlot hand)`
  已过时。
  ``
  `HangingPlaceEvent(@NotNull Hanging hanging, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace, @Nullable EquipmentSlot hand, @Nullable ItemStack itemStack)`

- ## org.bukkit.event.player中EquipmentSlot的使用

  返回EquipmentSlot的org.bukkit.event.player中的方法
  修饰符和类型
  方法
  说明
  `@NotNull EquipmentSlot`
  PlayerArmorStandManipulateEvent.`getHand()`
  用于执行这次交互的手.
  `@NotNull EquipmentSlot`
  PlayerBucketEntityEvent.`getHand()`
  Get the hand that was used to bucket the entity.
  `@NotNull EquipmentSlot`
  PlayerBucketEvent.`getHand()`
  Get the hand that was used in this event.
  `@Nullable EquipmentSlot`
  PlayerFishEvent.`getHand()`
  Get the hand that was used in this event.
  `@NotNull EquipmentSlot`
  PlayerHarvestBlockEvent.`getHand()`
  获取用于收获方块的手。
  `@NotNull EquipmentSlot`
  PlayerInteractEntityEvent.`getHand()`
  用于执行这次交互的手.
  `@Nullable EquipmentSlot`
  PlayerInteractEvent.`getHand()`
  获取用来进行本次交互的手, 但当玩家的交互动作类型为 `Action.PHYSICAL` 时可能为空.
  `@NotNull EquipmentSlot`
  PlayerItemConsumeEvent.`getHand()`
  Get the hand used to consume the item.
  `@NotNull EquipmentSlot`
  PlayerShearEntityEvent.`getHand()`
  获取用于剪切实体的手.
  `@NotNull EquipmentSlot`
  PlayerUnleashEntityEvent.`getHand()`
  Get the hand used by the player to unleash the entity.
  `@NotNull EquipmentSlot`
  PlayerArmorStandManipulateEvent.`getSlot()`
  返回在此事件中盔甲架的装备槽.
  `@NotNull EquipmentSlot`
  PlayerItemMendEvent.`getSlot()`
  Get the `EquipmentSlot` in which the repaired `ItemStack` may be found.
  参数类型为EquipmentSlot的org.bukkit.event.player中的构造器
  限定符
  构造器
  说明
  ``
  `PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot)`
  已过时。
  ``
  `PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot, @NotNull EquipmentSlot hand)`
  ``
  `PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand)`
  ``
  `PlayerBucketEntityEvent(@NotNull Player player, @NotNull Entity entity, @NotNull ItemStack originalBucket, @NotNull ItemStack entityBucket, @NotNull EquipmentSlot hand)`
  ``
  `PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand)`
  ``
  `PlayerBucketFillEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand)`
  ``
  `PlayerBucketFishEvent(@NotNull Player player, @NotNull Fish fish, @NotNull ItemStack waterBucket, @NotNull ItemStack fishBucket, @NotNull EquipmentSlot hand)`
  已过时。
  ``
  `PlayerFishEvent(@NotNull Player player, @Nullable Entity entity, @NotNull FishHook hookEntity, @Nullable EquipmentSlot hand, @NotNull PlayerFishEvent.State state)`
  ``
  `PlayerHarvestBlockEvent(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> itemsHarvested)`
  ``
  `PlayerInteractAtEntityEvent(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull Vector position, @NotNull EquipmentSlot hand)`
  ``
  `PlayerInteractEntityEvent(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull EquipmentSlot hand)`
  ``
  `PlayerInteractEvent(@NotNull Player who, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand)`
  ``
  `PlayerInteractEvent(@NotNull Player who, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand, @Nullable Vector clickedPosition)`
  ``
  `PlayerItemConsumeEvent(@NotNull Player player, @NotNull ItemStack item, @NotNull EquipmentSlot hand)`
  ``
  `PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull EquipmentSlot slot, @NotNull ExperienceOrb experienceOrb, int repairAmount)`
  ``
  `PlayerShearEntityEvent(@NotNull Player who, @NotNull Entity what, @NotNull ItemStack item, @NotNull EquipmentSlot hand)`
  ``
  `PlayerUnleashEntityEvent(@NotNull Entity entity, @NotNull Player player, @NotNull EquipmentSlot hand)`

- ## org.bukkit.inventory中EquipmentSlot的使用

  返回EquipmentSlot的org.bukkit.inventory中的方法
  修饰符和类型
  方法
  说明
  `@NotNull EquipmentSlot`
  EquipmentSlotGroup.`getExample()`
  已过时。
  for internal compatibility use only
  `static EquipmentSlot`
  EquipmentSlot.`valueOf(String name)`
  返回带有指定名称的该类型的枚举常量。
  `static EquipmentSlot[]`
  EquipmentSlot.`values()`
  按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
  参数类型为EquipmentSlot的org.bukkit.inventory中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Multimap<Attribute,AttributeModifier>`
  ItemType.`getDefaultAttributeModifiers(@NotNull EquipmentSlot slot)`
  Return an immutable copy of all default `Attribute`s and their `AttributeModifier`s for a given `EquipmentSlot`.
  `@NotNull ItemStack`
  EntityEquipment.`getItem(@NotNull EquipmentSlot slot)`
  Gets the ItemStack at the given equipment slot in the inventory.
  `@Nullable ItemStack`
  PlayerInventory.`getItem(@NotNull EquipmentSlot slot)`
  Gets the ItemStack at the given equipment slot in the inventory.
  `void`
  EntityEquipment.`setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item)`
  Stores the ItemStack at the given equipment slot in the inventory.
  `void`
  EntityEquipment.`setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item, boolean silent)`
  Stores the ItemStack at the given equipment slot in the inventory.
  `void`
  PlayerInventory.`setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item)`
  Stores the ItemStack at the given equipment slot in the inventory.
  `boolean`
  EquipmentSlotGroup.`test(@NotNull EquipmentSlot test)`

- ## org.bukkit.inventory.meta中EquipmentSlot的使用

  参数类型为EquipmentSlot的org.bukkit.inventory.meta中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Multimap<Attribute,AttributeModifier>`
  ItemMeta.`getAttributeModifiers(@NotNull EquipmentSlot slot)`
  返回指定 `EquipmentSlot` 的所有属性及其修饰符的不可变列表.
  `boolean`
  ItemMeta.`removeAttributeModifier(@NotNull EquipmentSlot slot)`
  为指定的 `EquipmentSlot` 移除其所有的`属性`和`属性修饰符`.
  如果给定的 `EquipmentSlot` 为 null, 这将移除所有没有设置 `EquipmentSlot` 的 `AttributeModifier`.