mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 18:41:47 +00:00
Fixed error
This commit is contained in:
parent
2ef1f0c9d0
commit
c42fd790ff
@ -1067,7 +1067,7 @@ class Player{
|
|||||||
$this->data->set("caseusername", $this->username);
|
$this->data->set("caseusername", $this->username);
|
||||||
$this->inventory = array();
|
$this->inventory = array();
|
||||||
foreach($this->data->get("inventory") as $slot => $item){
|
foreach($this->data->get("inventory") as $slot => $item){
|
||||||
if(!is_array($item)){
|
if(!is_array($item) or count($item) < 3){
|
||||||
$item = array(AIR, 0, 0);
|
$item = array(AIR, 0, 0);
|
||||||
}
|
}
|
||||||
$this->inventory[$slot] = BlockAPI::getItem($item[0], $item[1], $item[2]);
|
$this->inventory[$slot] = BlockAPI::getItem($item[0], $item[1], $item[2]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user