I try make monster plugin, And monster kill online player have error. How to fix it? TypeError: "Return value of pocketmine\entity\Entity::getNameTag() must be of the type string, null returned" (EXCEPTION) in "src/pocketmine/entity/Entity" at line 744 18:32:55 <Server thread/Debug> #0 src/pocketmine/event/player/PlayerDeathEvent(114): pocketmine\entity\Entity->getNameTag() 18:32:55 <Server thread/Debug> #1 src/pocketmine/event/player/PlayerDeathEvent(53): pocketmine\event\player\PlayerDeathEvent::deriveMessage(string[12] Rattlyfn2000, object pocketmine\event\entity\EntityDamageByEntityEvent) 18:32:55 <Server thread/Debug> #2 src/pocketmine/Player(3881): pocketmine\event\player\PlayerDeathEvent->__construct(object pocketmine\Player, array[24]) 18:32:55 <Server thread/Debug> #3 src/pocketmine/entity/Living(741): pocketmine\Player->onDeath() 18:32:55 <Server thread/Debug> #4 src/pocketmine/Player(3871): pocketmine\entity\Living->kill() 18:32:55 <Server thread/Debug> #5 src/pocketmine/Player(1803): pocketmine\Player->kill() 18:32:55 <Server thread/Debug> #6 src/pocketmine/level/Level(898): pocketmine\Player->onUpdate(integer 4903) 18:32:55 <Server thread/Debug> #7 src/pocketmine/level/Level(826): pocketmine\level\Level->actuallyDoTick(integer 4903) 18:32:55 <Server thread/Debug> #8 src/pocketmine/Server(2359): pocketmine\level\Level->doTick(integer 4903) 18:32:55 <Server thread/Debug> #9 src/pocketmine/Server(2482): pocketmine\Server->checkTickUpdates(integer 4903, double 1588847575.02) 18:32:55 <Server thread/Debug> #10 src/pocketmine/Server(2250): pocketmine\Server->tick() 18:32:55 <Server thread/Debug> #11 src/pocketmine/Server(2100): pocketmine\Server->tickProcessor() 18:32:55 <Server thread/Debug> #12 src/pocketmine/Server(1687): pocketmine\Server->start() 18:32:55 <Server thread/Debug> #13 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[42] D:\pm............\pm............ - ......\, string[50] D:\pm............\pm............ - ......\plugins\) 18:32:55 <Server thread/Debug> #14 src/pocketmine/PocketMine(296): pocketmine\server() 18:32:55 <Server thread/Debug> #15 index(2): require(string[97] phar://D:/pm............/pm............ - ....../pocketmine-mp.phar/src/pocketmi)
And this mine entity zombie class , if need more class I can send. PHP: <?phpnamespace pve\entity\monster\walking\WearableMonster;use pocketmine\item\Item;use pve\entity\monster\WearableMonster;class AZombie extends WearableMonster{ const NETWORK_ID = 32; public $width = 0.6; public $height = 1.8; public $eyeHeight = 1.62; public function getName() : string{ return "Zombie"; } public function getDrops() : array{ if($this->rpg === []){ switch(mt_rand(1, 3)){ case 1: case 2: return [Item::get(367, 0, mt_rand(1, 3))]; default: return []; } }else{ return []; } }}