@ParametersAreNonnullByDefault public interface InventoryObserver
| Modifier and Type | Method and Description |
|---|---|
void |
onInventoryContentsChange(ItemInstance[] contents,
Inventory inventory)
Called when the entire contents of the inventory is changed within the observed inventory.
|
void |
onInventorySlotChange(int slot,
ItemInstance oldItem,
ItemInstance newItem,
Inventory inventory,
PlayerSession session)
Called when a single slot is changed within the observed inventory.
|
void onInventorySlotChange(int slot,
@Nullable
ItemInstance oldItem,
@Nullable
ItemInstance newItem,
Inventory inventory,
@Nullable
PlayerSession session)
slot - slot in questionoldItem - old item in slotnewItem - new item in slotinventory - inventory being observedsession - session which caused the changevoid onInventoryContentsChange(ItemInstance[] contents, Inventory inventory)
contents - new contents of the inventoryinventory - inventory being observedCopyright © 2017–2018 NukkitX. All rights reserved.