From bfdd1512871742a9e78d207e60cea30f85c7d9b9 Mon Sep 17 00:00:00 2001 From: Zemtzov7 <72821250+zmv7@users.noreply.github.com> Date: Sun, 20 Nov 2022 00:39:48 +0500 Subject: [PATCH] Update init.lua --- mods/sethome/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/sethome/init.lua b/mods/sethome/init.lua index 476e43cc..c6f07a17 100644 --- a/mods/sethome/init.lua +++ b/mods/sethome/init.lua @@ -89,6 +89,10 @@ minetest.register_chatcommand("home", { description = S("Teleport you to your home point"), privs = {home = true}, func = function(name) + local player = minetest.get_player_by_name(name) + if not player then + return false, "This command can be executed in-game only" + end if sethome.go(name) then return true, S("Teleported to home!") end