From 86ec7ed77118fb7c800975cb971f8b8aaec1de09 Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Mon, 22 Feb 2016 18:24:51 +0800 Subject: [PATCH] Fixed player not dying --- src/pocketmine/Player.php | 6 +++--- src/pocketmine/entity/Human.php | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 09c293020..77de5256f 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -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); } } diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 36dec8ae8..7c7b1ab64 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -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));