Fixed error

This commit is contained in:
Shoghi Cervantes 2013-06-10 15:36:45 +02:00
parent 2ef1f0c9d0
commit c42fd790ff

View File

@ -1067,7 +1067,7 @@ class Player{
$this->data->set("caseusername", $this->username);
$this->inventory = array();
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);
}
$this->inventory[$slot] = BlockAPI::getItem($item[0], $item[1], $item[2]);