diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index c3cc0efe6..96561cd4e 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -261,6 +261,20 @@ abstract class Entity extends Location implements Metadatable{ } + /** + * @return string + */ + public function getNameTag(){ + return $this->getDataProperty(self::DATA_NAMETAG); + } + + /** + * @param string $name + */ + public function setNameTag($name){ + $this->setDataProperty(self::DATA_NAMETAG, self::DATA_TYPE_STRING, $name); + } + /** * @return Effect[] */ diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 9e006a359..4e1c3604d 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -71,20 +71,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ $this->isSlim = (bool) $isSlim; } - /** - * @return string - */ - public function getNameTag(){ - return $this->getDataProperty(self::DATA_NAMETAG); - } - - /** - * @param string $name - */ - public function setNameTag($name){ - $this->setDataProperty(self::DATA_NAMETAG, self::DATA_TYPE_STRING, $name); - } - public function getInventory(){ return $this->inventory; }