Created
October 7, 2024 12:27
-
-
Save Montandalar/73c6c4cfb8b6f8403903b77078ea1589 to your computer and use it in GitHub Desktop.
Minetest dofile multiple times
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
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 | |
}) |
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
minetest.chat_send_all("Hello, world!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment