Class PlayerInventoryMock
java.lang.Object
be.seeseemelk.mockbukkit.inventory.InventoryMock
be.seeseemelk.mockbukkit.inventory.PlayerInventoryMock
- All Implemented Interfaces:
Iterable<ItemStack>,EntityEquipment,Inventory,PlayerInventory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionItemStack @NotNull []getBoots()floatfloatfloatgetDropChance(@NotNull EquipmentSlot slot) ItemStack @NotNull []intfloat@NotNull ItemStackgetItem(@NotNull EquipmentSlot slot) Gets theItemStackat the given equipment slot in the inventory.@NotNull ItemStackDeprecated.float@NotNull ItemStackfloat@NotNull ItemStackfloatfloatItemStack @NotNull []voidsetArmorContents(ItemStack @Nullable [] items) voidvoidvoidsetBootsDropChance(float chance) voidsetChestplate(@Nullable ItemStack chestplate, boolean silent) voidsetChestplate(ItemStack chestplate) voidsetChestplateDropChance(float chance) voidsetDropChance(@NotNull EquipmentSlot slot, float chance) voidsetExtraContents(ItemStack @Nullable [] items) voidsetHeldItemSlot(int slot) voidvoidvoidsetHelmetDropChance(float chance) voidsetItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item) voidsetItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item, boolean silent) voidsetItemInHand(ItemStack stack) Deprecated.voidsetItemInHandDropChance(float chance) voidsetItemInMainHand(@Nullable ItemStack item, boolean silent) voidsetItemInMainHand(ItemStack item) voidsetItemInMainHandDropChance(float chance) voidsetItemInOffHand(@Nullable ItemStack item, boolean silent) voidsetItemInOffHand(ItemStack item) voidsetItemInOffHandDropChance(float chance) voidsetLeggings(@Nullable ItemStack leggings, boolean silent) voidsetLeggings(ItemStack leggings) voidsetLeggingsDropChance(float chance) voidsetStorageContents(ItemStack[] items) Methods inherited from class be.seeseemelk.mockbukkit.inventory.InventoryMock
addItem, addItem, addViewer, addViewers, addViewers, all, all, assertContainsAny, assertContainsAtLeast, assertTrueForAll, assertTrueForNonNulls, assertTrueForSome, clear, clear, close, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getNumberOfItems, getSize, getSnapshot, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, removeItemAnySlot, removeViewer, setContents, setItem, setMaxStackSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.inventory.EntityEquipment
clearMethods inherited from interface org.bukkit.inventory.Inventory
addItem, all, all, clear, clear, close, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getSize, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, removeItemAnySlot, setContents, setMaxStackSizeMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.bukkit.inventory.PlayerInventory
setItem
-
Field Details
-
HOTBAR
protected static final int HOTBAR- See Also:
-
SLOT_BAR
protected static final int SLOT_BAR- See Also:
-
BOOTS
protected static final int BOOTS- See Also:
-
LEGGINGS
protected static final int LEGGINGS- See Also:
-
CHESTPLATE
protected static final int CHESTPLATE- See Also:
-
HELMET
protected static final int HELMET- See Also:
-
OFF_HAND
protected static final int OFF_HAND- See Also:
-
-
Constructor Details
-
PlayerInventoryMock
-
-
Method Details
-
getHolder
- Specified by:
getHolderin interfaceEntityEquipment- Specified by:
getHolderin interfaceInventory- Specified by:
getHolderin interfacePlayerInventory- Overrides:
getHolderin classInventoryMock
-
getStorageContents
- Specified by:
getStorageContentsin interfaceInventory- Overrides:
getStorageContentsin classInventoryMock
-
setStorageContents
- Specified by:
setStorageContentsin interfaceInventory- Overrides:
setStorageContentsin classInventoryMock- Throws:
IllegalArgumentException
-
getArmorContents
- Specified by:
getArmorContentsin interfaceEntityEquipment- Specified by:
getArmorContentsin interfacePlayerInventory
-
getExtraContents
- Specified by:
getExtraContentsin interfacePlayerInventory
-
getHelmet
- Specified by:
getHelmetin interfaceEntityEquipment- Specified by:
getHelmetin interfacePlayerInventory
-
getChestplate
- Specified by:
getChestplatein interfaceEntityEquipment- Specified by:
getChestplatein interfacePlayerInventory
-
getLeggings
- Specified by:
getLeggingsin interfaceEntityEquipment- Specified by:
getLeggingsin interfacePlayerInventory
-
getBoots
- Specified by:
getBootsin interfaceEntityEquipment- Specified by:
getBootsin interfacePlayerInventory
-
setArmorContents
- Specified by:
setArmorContentsin interfaceEntityEquipment- Specified by:
setArmorContentsin interfacePlayerInventory
-
getItemInHandDropChance
public float getItemInHandDropChance()- Specified by:
getItemInHandDropChancein interfaceEntityEquipment
-
setItemInHandDropChance
public void setItemInHandDropChance(float chance) - Specified by:
setItemInHandDropChancein interfaceEntityEquipment
-
getItemInMainHandDropChance
public float getItemInMainHandDropChance()- Specified by:
getItemInMainHandDropChancein interfaceEntityEquipment
-
setItemInMainHandDropChance
public void setItemInMainHandDropChance(float chance) - Specified by:
setItemInMainHandDropChancein interfaceEntityEquipment
-
getItemInOffHandDropChance
public float getItemInOffHandDropChance()- Specified by:
getItemInOffHandDropChancein interfaceEntityEquipment
-
setItemInOffHandDropChance
public void setItemInOffHandDropChance(float chance) - Specified by:
setItemInOffHandDropChancein interfaceEntityEquipment
-
getHelmetDropChance
public float getHelmetDropChance()- Specified by:
getHelmetDropChancein interfaceEntityEquipment
-
setHelmetDropChance
public void setHelmetDropChance(float chance) - Specified by:
setHelmetDropChancein interfaceEntityEquipment
-
getChestplateDropChance
public float getChestplateDropChance()- Specified by:
getChestplateDropChancein interfaceEntityEquipment
-
setChestplateDropChance
public void setChestplateDropChance(float chance) - Specified by:
setChestplateDropChancein interfaceEntityEquipment
-
getLeggingsDropChance
public float getLeggingsDropChance()- Specified by:
getLeggingsDropChancein interfaceEntityEquipment
-
setLeggingsDropChance
public void setLeggingsDropChance(float chance) - Specified by:
setLeggingsDropChancein interfaceEntityEquipment
-
getBootsDropChance
public float getBootsDropChance()- Specified by:
getBootsDropChancein interfaceEntityEquipment
-
setBootsDropChance
public void setBootsDropChance(float chance) - Specified by:
setBootsDropChancein interfaceEntityEquipment
-
setExtraContents
- Specified by:
setExtraContentsin interfacePlayerInventory
-
setHelmet
- Specified by:
setHelmetin interfaceEntityEquipment- Specified by:
setHelmetin interfacePlayerInventory
-
setHelmet
- Specified by:
setHelmetin interfaceEntityEquipment
-
setChestplate
- Specified by:
setChestplatein interfaceEntityEquipment- Specified by:
setChestplatein interfacePlayerInventory
-
setChestplate
- Specified by:
setChestplatein interfaceEntityEquipment
-
setLeggings
- Specified by:
setLeggingsin interfaceEntityEquipment- Specified by:
setLeggingsin interfacePlayerInventory
-
setLeggings
- Specified by:
setLeggingsin interfaceEntityEquipment
-
setBoots
- Specified by:
setBootsin interfaceEntityEquipment- Specified by:
setBootsin interfacePlayerInventory
-
setBoots
- Specified by:
setBootsin interfaceEntityEquipment
-
getItemInMainHand
- Specified by:
getItemInMainHandin interfaceEntityEquipment- Specified by:
getItemInMainHandin interfacePlayerInventory
-
setItemInMainHand
- Specified by:
setItemInMainHandin interfaceEntityEquipment- Specified by:
setItemInMainHandin interfacePlayerInventory
-
setItemInMainHand
- Specified by:
setItemInMainHandin interfaceEntityEquipment
-
getItemInOffHand
- Specified by:
getItemInOffHandin interfaceEntityEquipment- Specified by:
getItemInOffHandin interfacePlayerInventory
-
setItemInOffHand
- Specified by:
setItemInOffHandin interfaceEntityEquipment- Specified by:
setItemInOffHandin interfacePlayerInventory
-
setItemInOffHand
- Specified by:
setItemInOffHandin interfaceEntityEquipment
-
getItemInHand
Deprecated.- Specified by:
getItemInHandin interfaceEntityEquipment- Specified by:
getItemInHandin interfacePlayerInventory
-
setItemInHand
Deprecated.- Specified by:
setItemInHandin interfaceEntityEquipment- Specified by:
setItemInHandin interfacePlayerInventory
-
getItem
Gets theItemStackat the given equipment slot in the inventory.Implementation note: only the contents of the main hand and the off hand are guaranteed not to be
null, despite the annotation present in the Bukkit api.- Specified by:
getItemin interfaceEntityEquipment- Specified by:
getItemin interfacePlayerInventory- Parameters:
slot- the slot to get theItemStack- Returns:
- the
ItemStackin the given slot
-
setItem
- Specified by:
setItemin interfaceEntityEquipment- Specified by:
setItemin interfacePlayerInventory
-
setItem
public void setItem(@NotNull @NotNull EquipmentSlot slot, @Nullable @Nullable ItemStack item, boolean silent) - Specified by:
setItemin interfaceEntityEquipment
-
getHeldItemSlot
public int getHeldItemSlot()- Specified by:
getHeldItemSlotin interfacePlayerInventory
-
setHeldItemSlot
public void setHeldItemSlot(int slot) - Specified by:
setHeldItemSlotin interfacePlayerInventory
-
getDropChance
- Specified by:
getDropChancein interfaceEntityEquipment
-
setDropChance
- Specified by:
setDropChancein interfaceEntityEquipment
-