(Hopefully) Fix crash on issuing /spawnpoint on non-local servers

master
David 2020-12-03 17:37:06 +00:00
parent 6563758dad
commit 4685a16287
1 changed files with 1 additions and 0 deletions

View File

@ -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