(Hopefully) Fix crash on issuing /spawnpoint on non-local servers
parent
6563758dad
commit
4685a16287
1
init.lua
1
init.lua
|
@ -360,6 +360,7 @@ minetest.register_chatcommand("spawnpoint", {
|
|||
func = function(name, param)
|
||||
local is_privilegespawnpoint = spawnpoint.privilegespawnpoint ~= nil
|
||||
if is_privilegespawnpoint then
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local is_priv = minetest.check_player_privs(player, {[spawnpoint.privilegespawnpoint.privilege] = true })
|
||||
if (is_privilegespawnpoint and is_priv) then
|
||||
if not param or param == "" then
|
||||
|
|
Loading…
Reference in New Issue