Separate names with a comma.
Comments in 'Plugin Development' started by AppPhil, Nov 6, 2015.
how can I use $player->heal() correctly?
Thanks in advance!
I don't understand how that should help.
Sorry, I gave the wrong link. Here it is: https://github.com/PocketMine/Pocke...3589b64/src/pocketmine/entity/Entity.php#L597
Sometimes heal() removes hearts from player. :/
i use it on my source and it dont work by my
Why don't just simply setHealth
some says its broken.
im not sure if this works but try this: (Make sure you have added EntityRegainHealth class)
$healValue = 1;
$player->heal($healValue, new EntityRegainHealthEvent($player, $healValue, EntityRegainHealthEvent::CAUSE_EATING));
setHealth works for me
What version of Pocketmine you're using?