From Minetest Developer Wiki
Jump to navigation Jump to search
Mbox warning.png This page contains unofficial, low-quality Lua API documentation and is likely to be outdated or wrong. Do not rely on it!
For the official and up-to-date documentation, see Lua API Documentation.
Mbox warning.png This page has been proposed for deletion for the following reason: "Contains unofficial and potentially outdated, redundant and inconsistent Lua API information"
If you don't think that this page should be deleted, please explain why on the talk page.




Gets an InvRef to access inventory methods.

location is a table:

  • <source enclose="none">{type="player", name="foobar"}</source>
  • <source enclose="none">{type="node", pos={x=, y=, z=}}</source>
  • <source enclose="none">{type="detached", name="creative"}</source>


<source> local inv = minetest.get_inventory({type="player", name="foobar"}) </source>