From 05dfef51535a957b499b1e5504edd0fd38e10598 Mon Sep 17 00:00:00 2001 From: Freeman Date: Sun, 13 Oct 2024 12:43:48 +0200 Subject: [PATCH] assert that player is not fake player to broadcast --- functions.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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({