From ae731c90931f62a5e460781ee0bf2d563b5c8bd3 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 23 Mar 2013 18:21:40 +0100 Subject: [PATCH] Added the caseusername preference on offline player data --- src/API/PlayerAPI.php | 1 + src/Player.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 9532c91d..c6867689 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 3a76856f..1a4a25b5 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");