mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-24 21:49:43 +00:00
Fixed possible armor crash
This commit is contained in:
parent
ea17ff9d9b
commit
6c941977f3
1 changed files with 2 additions and 1 deletions
|
|
@ -1438,6 +1438,7 @@ class Player{
|
|||
if($slot->getID() !== AIR and $s->getID() === AIR){
|
||||
$this->addItem($slot->getID(), $slot->getMetadata(), 1, false);
|
||||
$this->armor[$i] = BlockAPI::getItem(AIR, 0, 0);
|
||||
$data["slot$i"] = 255;
|
||||
}elseif($s->getID() !== AIR and $slot->getID() === AIR and ($sl = $this->hasItem($s->getID())) !== false){
|
||||
$this->armor[$i] = $this->getSlot($sl);
|
||||
$this->setSlot($sl, BlockAPI::getItem(AIR, 0, 0), false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue