mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Added the caseusername preference on offline player data
This commit is contained in:
parent
d613fa2138
commit
ae731c9093
@ -287,6 +287,7 @@ class PlayerAPI{
|
|||||||
public function getOffline($name){
|
public function getOffline($name){
|
||||||
$iname = strtolower($name);
|
$iname = strtolower($name);
|
||||||
$default = array(
|
$default = array(
|
||||||
|
"caseusername" => $name,
|
||||||
"position" => array(
|
"position" => array(
|
||||||
"x" => $this->server->spawn["x"],
|
"x" => $this->server->spawn["x"],
|
||||||
"y" => $this->server->spawn["y"],
|
"y" => $this->server->spawn["y"],
|
||||||
|
@ -671,6 +671,7 @@ class Player{
|
|||||||
if(!$this->data->exists("inventory") or $this->gamemode === CREATIVE){
|
if(!$this->data->exists("inventory") or $this->gamemode === CREATIVE){
|
||||||
$this->data->set("inventory", $this->inventory);
|
$this->data->set("inventory", $this->inventory);
|
||||||
}
|
}
|
||||||
|
$this->data->set("caseusername", $this->username);
|
||||||
$this->inventory = $this->data->get("inventory");
|
$this->inventory = $this->data->get("inventory");
|
||||||
$this->armor = $this->data->get("armor");
|
$this->armor = $this->data->get("armor");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user