Fixed player not dying

This commit is contained in:
PEMapModder 2016-02-22 18:24:51 +08:00
parent 83f29fd871
commit 86ec7ed771
2 changed files with 3 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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));