From f58b931c3bb6aaa5f893b0e6162535bc4dc9cbaf Mon Sep 17 00:00:00 2001 From: samalero Date: Mon, 2 May 2016 11:35:43 +0300 Subject: [PATCH] Update ShowMessageTask.php Fixing bugs... --- src/SimpleAuth/task/ShowMessageTask.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SimpleAuth/task/ShowMessageTask.php b/src/SimpleAuth/task/ShowMessageTask.php index ca07d1f..aefc164 100644 --- a/src/SimpleAuth/task/ShowMessageTask.php +++ b/src/SimpleAuth/task/ShowMessageTask.php @@ -43,7 +43,8 @@ public function addPlayer(Player $player){ } public function removePlayer(Player $player){ - unset($this->playerList[$player->getUniqueId()->toString()]); + if ($player->getUniqueId() != null) + unset($this->playerList[$player->getUniqueId()->toString()]); } public function onRun($currentTick){ @@ -57,4 +58,4 @@ public function onRun($currentTick){ } } -} \ No newline at end of file +}