diff --git a/functions.lua b/functions.lua index 6cca60e..b0d84f4 100644 --- a/functions.lua +++ b/functions.lua @@ -22,7 +22,9 @@ local S = core.get_translator(core.get_current_modname()) function emeraldbank.broadcast(player, msg, color, timeout) - if not player:is_player() then return end + if not (player and type(player) ~= "string" and player:is_player()) then + return + end local name = player:get_player_name() if core.get_modpath("notifications_wrapper") then notifications.queue({