From 8d4a5b6ad13e0fcb5e194a0180c80e26115d32cf Mon Sep 17 00:00:00 2001 From: notant <84870445+antbag-dev@users.noreply.github.com> Date: Thu, 16 May 2024 01:11:02 +0500 Subject: [PATCH] Update PlayerJoinListener.php --- src/antbag/JoinCount/PlayerJoinListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/antbag/JoinCount/PlayerJoinListener.php b/src/antbag/JoinCount/PlayerJoinListener.php index 76f5644..845ed63 100644 --- a/src/antbag/JoinCount/PlayerJoinListener.php +++ b/src/antbag/JoinCount/PlayerJoinListener.php @@ -27,15 +27,15 @@ public function onPlayerJoin(PlayerJoinEvent $event) { } private function loadData(): array { - $data = file_get_contents($this->dataFile); - return json_decode($data, true) ?? []; if (!file_exists($this->dataFile)) { return []; } + $data = file_get_contents($this->dataFile); + return json_decode($data, true) ?? []; } private function saveData(array $data) { $encodedData = json_encode($data); file_put_contents($this->dataFile, $encodedData); } -} \ No newline at end of file +}