mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fixed Armor AIR crash
This commit is contained in:
parent
402fc087ca
commit
5237867319
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue