Add setspawn.
This commit is contained in:
parent
36af3b1d92
commit
af524bf009
2 changed files with 27 additions and 6 deletions
13
chat.lua
13
chat.lua
|
@ -18,3 +18,16 @@ minetest.register_chatcommand("armor", {
|
|||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_chatcommand("setspawn", {
|
||||
params = "",
|
||||
description = "change your spawn position",
|
||||
privs = {},
|
||||
func = function(name, param)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local pos = player:getpos()
|
||||
fun_caves.db.spawn[name] = pos
|
||||
minetest.chat_send_player(name, 'Your spawn position has been changed.')
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue