Class PlayerUIElementDropItemEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.ui.PlayerUIElementDropItemEvent
Called when an item in inventory is dragged & dropped on a
UIElement. This does only work if
UIElement.setDroppable(boolean) was set to true (and the element is pickable). The item always
returns to its source slot, it's up to you to handle the drop (e.g by removing the item from the inventory).-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionintGets the source slot of the item before it was dragged.Gets the source slot type (e.g quickslot, equipment etc) of the item before it was dragged.getItem()Gets the item that was dropped on the UI element.Gets the UI element the item was dropped on with the cursor.Methods inherited from class PlayerEvent
getPlayer
-
Method Details
-
getUIElement
Gets the UI element the item was dropped on with the cursor.- Returns:
- the UI element the item was dropped on.
-
getItem
-
getInventorySlot
public int getInventorySlot()Gets the source slot of the item before it was dragged.- Returns:
- the item source slot in inventory.
-
getInventorySlotType
Gets the source slot type (e.g quickslot, equipment etc) of the item before it was dragged.- Returns:
- the source inventory slot type.
-