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 +}