Human: Added a hack for nametags

Apparently NAMETAG metadata is useless in AddPlayerPacket now, so it has to be sent separately.
This commit is contained in:
Dylan K. Taylor 2018-04-05 11:56:44 +01:00
parent a889a0e517
commit c06c1c7ce0

View File

@ -766,6 +766,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
$pk->metadata = $this->propertyManager->getAll();
$player->dataPacket($pk);
//TODO: Hack for MCPE 1.2.13: DATA_NAMETAG is useless in AddPlayerPacket, so it has to be sent separately
$this->sendData($player, [self::DATA_NAMETAG => [self::DATA_TYPE_STRING, $this->getNameTag()]]);
$this->armorInventory->sendContents($player);
if(!($this instanceof Player)){