枚举的使用
org.bukkit.inventory.EquipmentSlot
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
与属性有关的类 (Minecraft Wiki - 属性).
Classes relevant to mob spawners.
为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.参与操作玩家物品栏和物品交互的类.
用于操作可以存储在
物品堆
的额外数据的接口.-
org.bukkit中EquipmentSlot的使用
修饰符和类型方法说明Material.getDefaultAttributeModifiers
(@NotNull EquipmentSlot slot) Return an immutable copy of all defaultAttribute
s and theirAttributeModifier
s for a givenEquipmentSlot
.UnsafeValues.getDefaultAttributeModifiers
(Material material, EquipmentSlot slot) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
org.bukkit.attribute中EquipmentSlot的使用
限定符构造器说明AttributeModifier
(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull AttributeModifier.Operation operation, @Nullable EquipmentSlot slot) 已过时。 -
org.bukkit.block.spawner中EquipmentSlot的使用
修饰符和类型方法说明SpawnerEntry.Equipment.getDropChances()
Gets a mutable map of the drop chances for each slot of the entity. -
org.bukkit.entity中EquipmentSlot的使用
修饰符和类型方法说明void
ArmorStand.addEquipmentLock
(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType) Locks the equipment slot with the specifiedlocking mechanism
.boolean
ArmorStand.hasEquipmentLock
(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType) Returns if the ArmorStand has the specifiedlocking mechanism
.void
ArmorStand.removeEquipmentLock
(@NotNull EquipmentSlot slot, @NotNull ArmorStand.LockType lockType) Remove alocking mechanism
.void
Player.sendEquipmentChange
(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @Nullable ItemStack item) 向玩家发送某个实体的盔甲槽变化数据包.修饰符和类型方法说明void
Player.sendEquipmentChange
(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items) Send multiple equipment changes for the target entity. -
org.bukkit.event.block中EquipmentSlot的使用
限定符构造器说明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的使用
修饰符和类型方法说明EntityPlaceEvent.getHand()
Get the hand used to place the entity.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.EntityShootBowEvent.getHand()
Get the hand from which the bow was shot.PlayerLeashEntityEvent.getHand()
Returns the hand used by the player to leash the 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的使用
修饰符和类型方法说明HangingPlaceEvent.getHand()
Returns the hand that was used to place the hanging entity, or null if a player did not place the hanging entity.限定符构造器说明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的使用
修饰符和类型方法说明PlayerArmorStandManipulateEvent.getHand()
用于执行这次交互的手.PlayerBucketEntityEvent.getHand()
Get the hand that was used to bucket the entity.PlayerBucketEvent.getHand()
Get the hand that was used in this event.PlayerFishEvent.getHand()
Get the hand that was used in this event.PlayerHarvestBlockEvent.getHand()
获取用于收获方块的手。PlayerInteractEntityEvent.getHand()
用于执行这次交互的手.PlayerInteractEvent.getHand()
获取用来进行本次交互的手, 但当玩家的交互动作类型为Action.PHYSICAL
时可能为空.PlayerItemConsumeEvent.getHand()
Get the hand used to consume the item.PlayerShearEntityEvent.getHand()
获取用于剪切实体的手.PlayerUnleashEntityEvent.getHand()
Get the hand used by the player to unleash the entity.PlayerArmorStandManipulateEvent.getSlot()
返回在此事件中盔甲架的装备槽.PlayerItemMendEvent.getSlot()
Get theEquipmentSlot
in which the repairedItemStack
may be found.限定符构造器说明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的使用
修饰符和类型方法说明EquipmentSlotGroup.getExample()
已过时。for internal compatibility use onlystatic EquipmentSlot
返回带有指定名称的该类型的枚举常量。static EquipmentSlot[]
EquipmentSlot.values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。修饰符和类型方法说明ItemType.getDefaultAttributeModifiers
(@NotNull EquipmentSlot slot) Return an immutable copy of all defaultAttribute
s and theirAttributeModifier
s for a givenEquipmentSlot
.EntityEquipment.getItem
(@NotNull EquipmentSlot slot) Gets the ItemStack at the given equipment slot in the inventory.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的使用
修饰符和类型方法说明ItemMeta.getAttributeModifiers
(@NotNull EquipmentSlot slot) 返回指定EquipmentSlot
的所有属性及其修饰符的不可变列表.boolean
ItemMeta.removeAttributeModifier
(@NotNull EquipmentSlot slot) 为指定的EquipmentSlot
移除其所有的属性
和属性修饰符
.
如果给定的EquipmentSlot
为 null, 这将移除所有没有设置EquipmentSlot
的AttributeModifier
.
AttributeModifier.getSlotGroup()