mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Fixed Armor AIR crash
This commit is contained in:
parent
402fc087ca
commit
5237867319
@ -1703,7 +1703,7 @@ class Player{
|
||||
);
|
||||
$armor = array();
|
||||
for($i = 0; $i < 4; ++$i){
|
||||
if(isset($this->armor[$i]) and ($this->armor[$i] instanceof Item)){
|
||||
if(isset($this->armor[$i]) and ($this->armor[$i] instanceof Item) and $this->armor[$i]->getID() > AIR){
|
||||
$data["slot$i"] = $this->armor[$i]->getID() !== AIR ? $this->armor[$i]->getID() - 256:0;
|
||||
}else{
|
||||
$this->armor[$i] = BlockAPI::getItem(AIR, 0, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user