Skip to content

Instantly share code, notes, and snippets.

@Montandalar
Created October 7, 2024 12:27
Show Gist options
  • Save Montandalar/73c6c4cfb8b6f8403903b77078ea1589 to your computer and use it in GitHub Desktop.
Save Montandalar/73c6c4cfb8b6f8403903b77078ea1589 to your computer and use it in GitHub Desktop.
Minetest dofile multiple times
local filepath = minetest.get_modpath(minetest.get_current_modname()) .. "/it.lua"
minetest.register_chatcommand("reloadit", {
params = "reloadit",
description = "Reload the contents of this mod",
privs = {server=1},
func = function(name, player)
dofile(filepath)
end
})
minetest.chat_send_all("Hello, world!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment