Fix `player_exists` assert case

master
Maksim 2022-05-02 22:55:15 +03:00
parent 6819eca78e
commit 0fcac9ba09
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,9 @@
local S = areas.S
function areas:player_exists(name)
if type(name) ~= "string" then
return false
end
return minetest.get_auth_handler().get_auth(name) ~= nil
end