Class PlayerInventoryItemChangeEvent
java.lang.Object
net.minestom.server.event.inventory.InventoryItemChangeEvent
net.minestom.server.event.inventory.PlayerInventoryItemChangeEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,InventoryEvent
,PlayerEvent
,PlayerInstanceEvent
,RecursiveEvent
public class PlayerInventoryItemChangeEvent
extends InventoryItemChangeEvent
implements PlayerInstanceEvent
Called when
AbstractInventory.safeItemInsert(int, ItemStack)
is being invoked on a PlayerInventory
.
This event cannot be cancelled and items related to the change are already moved.
When this event is being called, InventoryItemChangeEvent
listeners will also be triggered, so you can
listen only for an ancestor event and check whether it is an instance of that class.
-
Constructor Summary
ConstructorDescriptionPlayerInventoryItemChangeEvent
(@NotNull Player player, int slot, @NotNull ItemStack previousItem, @NotNull ItemStack newItem) -
Method Summary
Methods inherited from class net.minestom.server.event.inventory.InventoryItemChangeEvent
getInventory, getNewItem, getPreviousItem, getSlot
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
PlayerInventoryItemChangeEvent
-
-
Method Details
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-