Merge branch 'next-minor' into next-major

This commit is contained in:
Dylan K. Taylor
2022-11-30 20:05:30 +00:00
10 changed files with 156 additions and 22 deletions

View File

@ -168,6 +168,13 @@ abstract class Living extends Entity{
$this->attributeMap->add($this->absorptionAttr = AttributeFactory::getInstance()->mustGet(Attribute::ABSORPTION));
}
/**
* Returns the name used to describe this entity in chat and command outputs.
*/
public function getDisplayName() : string{
return $this->nameTag !== "" ? $this->nameTag : $this->getName();
}
public function setHealth(float $amount) : void{
$wasAlive = $this->isAlive();
parent::setHealth($amount);