mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Proper same armor check
This commit is contained in:
parent
6c941977f3
commit
3ba213f2f0
1 changed files with 1 additions and 1 deletions
|
|
@ -1442,7 +1442,7 @@ class Player{
|
|||
}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);
|
||||
}elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($sl = $this->hasItem($s->getID())) !== false){
|
||||
}elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($slot->getID() !== $s->getID() or $slot->getMetadata() !== $s->getMetadata()) and ($sl = $this->hasItem($s->getID())) !== false){
|
||||
$item = $this->armor[$i];
|
||||
$this->armor[$i] = $this->getSlot($sl);
|
||||
$this->setSlot($sl, $item, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue