diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 9532c91d9..c68676893 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -287,6 +287,7 @@ class PlayerAPI{ public function getOffline($name){ $iname = strtolower($name); $default = array( + "caseusername" => $name, "position" => array( "x" => $this->server->spawn["x"], "y" => $this->server->spawn["y"], diff --git a/src/Player.php b/src/Player.php index 3a76856f7..1a4a25b52 100644 --- a/src/Player.php +++ b/src/Player.php @@ -671,6 +671,7 @@ class Player{ if(!$this->data->exists("inventory") or $this->gamemode === CREATIVE){ $this->data->set("inventory", $this->inventory); } + $this->data->set("caseusername", $this->username); $this->inventory = $this->data->get("inventory"); $this->armor = $this->data->get("armor");