From f913dc38bbd2b46d5645405967e9d57fc6ce3dba Mon Sep 17 00:00:00 2001 From: notant <84870445+antbag-dev@users.noreply.github.com> Date: Sun, 1 Oct 2023 11:58:46 +0500 Subject: [PATCH] Fixed Words not giving rewards --- src/antbag/chatgames/Main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/antbag/chatgames/Main.php b/src/antbag/chatgames/Main.php index b44cc3f..982b724 100644 --- a/src/antbag/chatgames/Main.php +++ b/src/antbag/chatgames/Main.php @@ -43,7 +43,7 @@ public function onChat(playerChatEvent $event) { $player = $event->getPlayer(); $msg = $event->getMessage(); - if (strtolower($msg) == strtolower($this->word)) { + if ($msg !== null && $this->word !== null && strtolower($msg) == strtolower($this->word)) { $event->cancel(); $this->rewardPlayer($player); $this->loadWords();