mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Reset player's armors after death
This commit is contained in:
parent
df01e92ab6
commit
3498c876df
1 changed files with 9 additions and 0 deletions
|
|
@ -167,6 +167,15 @@ class Entity extends Position{
|
||||||
$inv[] = array($slot->getID(), $slot->getMetadata(), $slot->count);
|
$inv[] = array($slot->getID(), $slot->getMetadata(), $slot->count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for($re = 0; $re < 3; $re++)
|
||||||
|
{
|
||||||
|
//TODO: Test this.
|
||||||
|
$slot = $this->player->getArmor($re);
|
||||||
|
$this->player->setArmor($re, BlockAPI::getItem(AIR, 0, 0));
|
||||||
|
if($slot->getID() !== AIR and $slot->count > 0){
|
||||||
|
$inv[] = array($slot->getID(), $slot->getMetadata(), $slot->count);
|
||||||
|
}
|
||||||
|
}
|
||||||
return $inv;
|
return $inv;
|
||||||
}elseif($this->class === ENTITY_OBJECT){
|
}elseif($this->class === ENTITY_OBJECT){
|
||||||
switch($this->type){
|
switch($this->type){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue