I tried something but I get an error PHP: $data = $t->getSpawnCompound(); $data->Text1 = new \pocketmine\nbt\tag\StringTag("Text1",$text[0]); $data->Text2 = new \pocketmine\nbt\tag\StringTag("Text2",$text[1]); $data->Text3 = new \pocketmine\nbt\tag\StringTag("Text3","Test"); $data->Text4 = new \pocketmine\nbt\tag\StringTag("Text4",$player->getName()); $nbt = new NBT(NBT::LITTLE_ENDIAN); $nbt->setData($data);$pk = new \pocketmine\network\protocol\EntityDataPacket(); $pk->x = $t->getX(); $pk->y = $t->getY(); $pk->z = $t->getZ(); $pk->namedtag = $nbt->write(); $player->dataPacket($pk);//Error: Class pocketmine\nbt\tag\StringTag not found. But it exists
This might help: https://github.com/Muirfield/KillRate/blob/master/src/aliuly/killrate/SignMgr.php#L91-#L106
I know how to do it. But it always says StringTag not found. And I imported it *Edit: I don't use it in the main file