Hello, i have published a Health viewer plugin two years ago, so far I was successful to update it but not for the new 4.0.0 API, can you help me ? I have this error on my console : Code: [08:23:02] [Server thread/CRITICAL]: [HealthOverHead] Could not execute task CookieCode\HealthOverHead\HealthTask: Call to undefined method CookieCode\HealthOverHead\HealthTask::getOwner() [08:23:02] [Server thread/CRITICAL]: Error: "Call to undefined method CookieCode\HealthOverHead\HealthTask::getOwner()" (EXCEPTION) in "plugins/HealthOverHead-master/src/CookieCode/HealthOverHead/HealthTask" at line 27 Can you help me to update it ?
Replace getOwner() with plugin or add the code bellow: PHP: public function getOwner() : Main{ return $this->plugin; }
Any error in the console? Please note there is a nametag bug that came on the 1.5. If there are no errors, then it means you fixed the plugin but you are facing this bug. Here is a function that was recently added and would work as a health bar: https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/entity/Entity.php#L615-L617 EDIT: There is no need to set the player's name on the score tag!
Please use a more informative title please note that API v4 is not supported or meant to be used unless you are actively developing PMMP the nametag wont update unless player relog because of mojang issues, as it will not to listen to player name update unless you are on a partnered server