mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 15:19:56 +00:00
Fixed player not dying
This commit is contained in:
parent
83f29fd871
commit
86ec7ed771
@ -3204,9 +3204,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
public function setHealth($amount){
|
||||
parent::setHealth($amount);
|
||||
if($this->spawned === true){
|
||||
// $pk = new SetHealthPacket();
|
||||
// $pk->health = $this->getHealth();
|
||||
// $this->dataPacket($pk);
|
||||
$pk = new SetHealthPacket();
|
||||
$pk->health = $this->getHealth();
|
||||
$this->dataPacket($pk);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
protected function addAttributes(){
|
||||
parent::addAttributes();
|
||||
|
||||
echo "a", PHP_EOL;
|
||||
$this->attributeMap->addAttribute(Attribute::getAttribute(Attribute::SATURATION));
|
||||
$this->attributeMap->addAttribute(Attribute::getAttribute(Attribute::EXHAUSTION));
|
||||
$this->attributeMap->addAttribute(Attribute::getAttribute(Attribute::HUNGER));
|
||||
|
Loading…
x
Reference in New Issue
Block a user