mirror of
https://github.com/minetest/minetest_game.git
synced 2025-07-07 00:30:22 +02:00
Update init.lua
This commit is contained in:
@ -89,6 +89,10 @@ minetest.register_chatcommand("home", {
|
|||||||
description = S("Teleport you to your home point"),
|
description = S("Teleport you to your home point"),
|
||||||
privs = {home = true},
|
privs = {home = true},
|
||||||
func = function(name)
|
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
|
if sethome.go(name) then
|
||||||
return true, S("Teleported to home!")
|
return true, S("Teleported to home!")
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user