moonscript
Search…
Inventory

inventory.swap

1
inventory.swap(hotbar, slot)
Copied!
Argument
Object
Description
windowId (optional)
Number
The windowId where the action will be performed
hotbar
Number
The hotbar slot where the item will be moved at
slot
Number
The slot of the item
Swaps an item slot with a hotbar slot.

inventory.shift

1
inventory.shift(slot)
Copied!
Argument
Object
Description
windowId (optional)
Number
The windowId where the action will be performed
slot
Number
The slot of the item
Shifts an item into your hotbar.

inventory.drop

1
inventory.drop(slot, stack)
Copied!
Argument
Object
Description
windowId (optional)
Number
The windowId where the action will be performed
slot
Number
The slot of the item
stack
Boolean
Defines if the whole stack should be dropped
Drops an item out of your inventory.

inventory.itemStack

1
inventory.itemStack(slot) - Item
Copied!
Argument
Object
Description
slot
Number
The slot of the item
Returns an Item object through an inventory slot.

inventory.itemStackOf

1
inventory.itemStackOf(entityName, slot)
Copied!
Argument
Object
Description
entityName
String
The name of the entity
slot
Number
The slot of the item
Returns an Item object of a player through an inventory slot.
Last modified 11mo ago