Moved Human->setNameTag() to Entity

This commit is contained in:
Shoghi Cervantes 2015-05-18 15:29:31 +02:00
parent ea7c0cb357
commit f3a53be117
2 changed files with 14 additions and 14 deletions

View File

@ -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[] * @return Effect[]
*/ */

View File

@ -71,20 +71,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
$this->isSlim = (bool) $isSlim; $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(){ public function getInventory(){
return $this->inventory; return $this->inventory;
} }