Inventory
Inventory functions
isSignOpened()
isSignOpened()
Returns true if sign opened.
Returns:
(boolean).
-- Example code showing how to use the function
local isOpened = player.inventory.isSignOpened()
getSignText(line)
getSignText(line)
Returns line of sign.
Returns:
(string).
-- Example code showing how to use the function
if player.inventory.isSignOpened() then
local line = player.inventory.getSignText(0)
end
setSignText(line, text)
setSignText(line, text)
Returns true if success.
Returns:
(boolean).
-- Example code showing how to use the function
if player.inventory.isSignOpened() then
local line = player.inventory.setSignText(0, "1000")
end
getChestTitle()
getChestTitle()
Returns chest title.
Returns:
(string).
-- Example code showing how to use the function
local title = player.inventory.getChestTitle()
getStack(slot)
getStack(slot)
Returns the item in the slot.
Parameters:
slot
(number) - Slot id.
Returns:
(item data).
Example Usage:
-- Example code showing how to use the function
local item = player.inventory.getStack(36)
getStackFromContainer(slot)
getStackFromContainer(slot)
Returns the item in the slot.
Parameters:
slot
(number) - Slot id.
Returns:
(item data).
Example Usage:
-- Example code showing how to use the function
local item = player.inventory.getStackFromContainer(36)
leftClick(slot)
leftClick(slot)
Returns true if successfully.
Parameters:
slot
(number) - Slot id.
Returns:
(boolean).
Example Usage:
-- Example code showing how to use the function
player.inventory.leftClick(36)
rightClick(slot)
rightClick(slot)
Returns true if successfully.
Parameters:
slot
(number) - Slot id.
Returns:
(boolean).
Example Usage:
-- Example code showing how to use the function
player.inventory.rightClick(36)
Last updated