This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core.register_chatcommand("itemslist", { | |
params = "[search]", | |
description = "find item names or list all items", | |
privs = {}, | |
func = function(name, param) | |
local number = 0 | |
local file = minetest.get_worldpath() .. "/items" | |
local output = io.open(file, "w") | |
for name, item in pairs(minetest.registered_items) do | |
number = number + 1 |