Contents
Class DropItemEvent.PlayerRequest
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.component.system.CancellableEcsEvent
com.hypixel.hytale.server.core.event.events.ecs.DropItemEvent
com.hypixel.hytale.server.core.event.events.ecs.DropItemEvent.PlayerRequest
- All Implemented Interfaces:
ICancellableEcsEvent
- Enclosing class:
DropItemEvent
An event that is called when a player attempts to drop an item from their inventory.
If cancelled, the players request to drop the item will not be processed. The event arrives already cancelled when the player's active gamemode type prevents item drops, and handlers may un-cancel it to allow the drop anyway.
-
Nested Class Summary
Nested classes/interfaces inherited from class DropItemEvent
DropItemEvent.Drop, DropItemEvent.PlayerRequest -
Constructor Summary
ConstructorsConstructorDescriptionPlayerRequest(int inventorySectionId, short slotId) Default Constructor for aDropItemEventinstance. -
Method Summary
Methods inherited from class CancellableEcsEvent
isCancelled, setCancelled
-
Constructor Details
-
PlayerRequest
public PlayerRequest(int inventorySectionId, short slotId) Default Constructor for aDropItemEventinstance.- Parameters:
inventorySectionId- The section ID of the inventory the item is being dropped from.slotId- The slot ID of the item being dropped.
-
-
Method Details
-
getInventorySectionId
public int getInventorySectionId()- Returns:
- the section ID of the inventory the item is being dropped from.
-
getSlotId
public short getSlotId()- Returns:
- the slot ID of the item being dropped.
-