Hello developers of PocketMine-MP. Because of 1.5 update, so the PMMP 3.0.6 doesn't work. So, can you make new version of pmmp or there available for dev build? I can contribute to testing. Thanks -
If I'm not mistaken, the game barely launches for many people in 1.5, so dktapps has decided to wait on updating the master branch until the game itself is patched. (source)
well, really I don't want you using master at all... you can find a 3.0 based branch compatible with 1.5.0 at https://github.com/pmmp/PocketMine-MP/tree/mc-broken-ed-1.5 but really, if you can downgrade or haven't updated yet, I recommend sticking to 1.4.x.
For nametags to be fully working you can use this: PHP: /** * @param Player[]|Player $player * @param array $data Properly formatted entity data, defaults to everything */ public function sendData($player, ?array $data = null) : void{ if(!is_array($player)){ $player = [$player]; } $pk = new SetEntityDataPacket(); $pk->entityRuntimeId = $this->getId(); $pk->metadata = $data ?? $this->propertyManager->getAll(); foreach($player as $p){ if($p === $this){ continue; } $p->dataPacket(clone $pk); } if($this instanceof Player){ $this->dataPacket($pk); if(isset($data[self::DATA_NAMETAG])){ if($this instanceof Player){ $pk = new RemoveEntityPacket(); $pk->entityUniqueId = $this->getId(); foreach($player as $p){ if($p === $this){ continue; } $p->dataPacket(clone $pk); } $pk = new AddPlayerPacket(); $pk->uuid = $this->getUniqueId(); $pk->username = $this->getNameTag(); $pk->entityRuntimeId = $this->getId(); $pk->position = $this->asVector3(); $pk->motion = $this->getMotion(); $pk->yaw = $this->yaw; $pk->pitch = $this->pitch; $pk->item = $this->getInventory()->getItemInHand(); $pk->metadata = $this->propertyManager->getAll(); foreach($player as $p){ if($p === $this){ continue; } $p->dataPacket(clone $pk); } } } } }
Hello, I'm a little confused about how to use this code, are you able to make this into a plugin? Thank you
Replace the function on line 2075 of pocketmine\entity\Entity.php with the one Driesboy sent. https://github.com/pmmp/PocketMine-...a8ba4f/src/pocketmine/entity/Entity.php#L2075
Yes. Also make sure you add PHP: use pocketmine\network\mcpe\protocol\AddPlayerPacket; to the top of Entity.php aswell after you replace the sendData function.
I tried it but it didn't work. Still the white nametag. I added the library and replaced the function, I used the latest source of pmmp (3.1.0). Here's the pastebin of my Entity.php: https://pastebin.com/9BHM5N0J I can't whats causing it not working, please help, thanks!