mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Hinting up Entity API to PHP 7.2 standards
This commit is contained in:
@ -39,7 +39,7 @@ class Villager extends Creature implements NPC, Ageable{
|
||||
return "Villager";
|
||||
}
|
||||
|
||||
protected function initEntity(){
|
||||
protected function initEntity() : void{
|
||||
parent::initEntity();
|
||||
|
||||
/** @var int $profession */
|
||||
@ -52,7 +52,7 @@ class Villager extends Creature implements NPC, Ageable{
|
||||
$this->setProfession($profession);
|
||||
}
|
||||
|
||||
public function saveNBT(){
|
||||
public function saveNBT() : void{
|
||||
parent::saveNBT();
|
||||
$this->namedtag->setInt("Profession", $this->getProfession());
|
||||
}
|
||||
@ -62,7 +62,7 @@ class Villager extends Creature implements NPC, Ageable{
|
||||
*
|
||||
* @param int $profession
|
||||
*/
|
||||
public function setProfession(int $profession){
|
||||
public function setProfession(int $profession) : void{
|
||||
$this->propertyManager->setInt(self::DATA_VARIANT, $profession);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user