I have plugin made by korean and when you die sometimes it leaves you half heart and being invisible, I want to fix it my self but I cant find the code so i decided to make a new plugin to fix the bug onDeath(PlayerDeathEvent $ev){ $player = $ev->getEntity(); $ev->$player spawn to spawnpoint $ev->setHealth(20); and please give me a code to show player, maybe the code for legionPE when you fix invisible players @PEMapModder
Does your server have auto health regen? That may be the reason why your players have 1 heart. As for spawning invisible players, https://github.com/LegionPE/LegionP...rc/legionpe/theta/utils/ResendPlayersTask.php However, this task should not be run too frequently, or it will cause signifiant lag to the server (because the skin in AddPlayerPacket is a pretty large payload). Also, @shoghicp discourages the use of respawnToAll().
Sorry, typo, I meant respawnToAll(). As for the reason, read the IRC logs. https://botbot.me/freenode/pocketmine/2015-08-13/?msg=47103904&page=1
when ur hunger is full it does regen slowly and I just want someone to add the code on my onDeath(.. up there, i want someone to add the missing part
Thank you for the hint! I fixed it by touching the code and setting the hunger to 18 instead of 20, because if hunger is 20 itll keep you healing even u die