mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +00:00
Reset player's armors after death
This commit is contained in:
parent
df01e92ab6
commit
3498c876df
@ -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…
x
Reference in New Issue
Block a user