Package ch.njol.skript.util.slot
Class EquipmentSlot
java.lang.Object
ch.njol.skript.util.slot.Slot
ch.njol.skript.util.slot.SlotWithIndex
ch.njol.skript.util.slot.EquipmentSlot
- All Implemented Interfaces:
Debuggable,AnyAmount,AnyNamed,AnyProvider
Represents equipment slot of an entity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionEquipmentSlot(@NotNull org.bukkit.entity.HumanEntity holder, int index) EquipmentSlot(@NotNull org.bukkit.entity.HumanEntity holder, org.bukkit.inventory.EquipmentSlot bukkitSlot) EquipmentSlot(@NotNull org.bukkit.inventory.EntityEquipment entityEquipment, @NotNull EquipmentSlot.EquipSlot skriptSlot) Deprecated, for removal: This API element is subject to removal in a future version.EquipmentSlot(@NotNull org.bukkit.inventory.EntityEquipment entityEquipment, @NotNull EquipmentSlot.EquipSlot skriptSlot, boolean slotToString) Deprecated, for removal: This API element is subject to removal in a future version.EquipmentSlot(@NotNull org.bukkit.inventory.EntityEquipment equipment, org.bukkit.inventory.EquipmentSlot bukkitSlot) EquipmentSlot(@NotNull org.bukkit.inventory.EntityEquipment entityEquipment, org.bukkit.inventory.EquipmentSlot bukkitSlot, boolean slotToString) -
Method Summary
Modifier and TypeMethodDescriptionintorg.bukkit.inventory.EquipmentSlotGet the correspondingEquipmentSlotDeprecated, for removal: This API element is subject to removal in a future version.intgetIndex()Gets an index of this slot.@Nullable org.bukkit.inventory.ItemStackgetItem()voidsetAmount(int amount) voidsetItem(@Nullable org.bukkit.inventory.ItemStack item) toString(@Nullable org.bukkit.event.Event event, boolean debug) Methods inherited from class ch.njol.skript.util.slot.SlotWithIndex
getRawIndex, isSameSlotMethods inherited from class ch.njol.skript.util.slot.Slot
amount, name, setAmount, setName, supportsAmountChange, supportsNameChange, toString
-
Constructor Details
-
EquipmentSlot
@Deprecated(since="2.11.0", forRemoval=true) public EquipmentSlot(@NotNull @NotNull org.bukkit.inventory.EntityEquipment entityEquipment, @NotNull @NotNull EquipmentSlot.EquipSlot skriptSlot, boolean slotToString) Deprecated, for removal: This API element is subject to removal in a future version. -
EquipmentSlot
@Deprecated(since="2.11.0", forRemoval=true) public EquipmentSlot(@NotNull @NotNull org.bukkit.inventory.EntityEquipment entityEquipment, @NotNull @NotNull EquipmentSlot.EquipSlot skriptSlot) Deprecated, for removal: This API element is subject to removal in a future version. -
EquipmentSlot
public EquipmentSlot(@NotNull @NotNull org.bukkit.inventory.EntityEquipment entityEquipment, @NotNull org.bukkit.inventory.EquipmentSlot bukkitSlot, boolean slotToString) -
EquipmentSlot
public EquipmentSlot(@NotNull @NotNull org.bukkit.inventory.EntityEquipment equipment, @NotNull org.bukkit.inventory.EquipmentSlot bukkitSlot) -
EquipmentSlot
public EquipmentSlot(@NotNull @NotNull org.bukkit.entity.HumanEntity holder, int index) -
EquipmentSlot
public EquipmentSlot(@NotNull @NotNull org.bukkit.entity.HumanEntity holder, @NotNull org.bukkit.inventory.EquipmentSlot bukkitSlot)
-
-
Method Details
-
getItem
@Nullable public @Nullable org.bukkit.inventory.ItemStack getItem() -
setItem
public void setItem(@Nullable @Nullable org.bukkit.inventory.ItemStack item) -
getAmount
public int getAmount() -
setAmount
public void setAmount(int amount) -
getEquipSlot
Deprecated, for removal: This API element is subject to removal in a future version. -
getEquipmentSlot
public org.bukkit.inventory.EquipmentSlot getEquipmentSlot()Get the correspondingEquipmentSlot- Returns:
-
getIndex
public int getIndex()Description copied from class:SlotWithIndexGets an index of this slot.- Specified by:
getIndexin classSlotWithIndex- Returns:
- Index of the slot.
-
toString
- Parameters:
event- The event to get information from. This is always null if debug == false.debug- If true this should print more information, if false this should print what is shown to the end user- Returns:
- String representation of this object
-
EquipmentSlot,EntityEquipmentinstead.