From 794caf7a98abf61462775b670482497f41fdcd11 Mon Sep 17 00:00:00 2001 From: kotyaralih <62548070+kotyaralih@users.noreply.github.com> Date: Sun, 26 Dec 2021 08:32:09 -0800 Subject: [PATCH] Player position is now saved as float value --- src/Player.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Player.php b/src/Player.php index e2bd4a47..3b98469b 100644 --- a/src/Player.php +++ b/src/Player.php @@ -237,15 +237,15 @@ class Player{ $this->data->set("achievements", $this->achievements); $this->data->set("position", array( "level" => $this->entity->level->getName(), - "x" => $this->entity->x, - "y" => $this->entity->y, - "z" => $this->entity->z, + "x" => (float) $this->entity->x, + "y" => (float) $this->entity->y, + "z" => (float) $this->entity->z, )); $this->data->set("spawn", array( "level" => $this->spawnPosition->level->getName(), - "x" => $this->spawnPosition->x, - "y" => $this->spawnPosition->y, - "z" => $this->spawnPosition->z, + "x" => (float) $this->spawnPosition->x, + "y" => (float) $this->spawnPosition->y, + "z" => (float) $this->spawnPosition->z, )); $inv = array(); foreach($this->inventory as $slot => $item){