PHP: $pk = new AddPlayerPacket();$pk->eid = 837373737; //id of the FloatingText$pk->uuid = UUID::fromRandom();$pk->x = 275.5;$pk->y = 8;$pk->z = 284.5;$pk->speedX = 0;$pk->speedY = 0;$pk->speedZ = 0;$pk->yaw = 275;$pk->pitch = 0;$pk->item = Item::get(0);$pk->meta = 0;$flags = 0;$flags |= 1 << Entity::DATA_FLAG_INVISIBLE; //set the player invisible$flags |= 1 << Entity::DATA_FLAG_CAN_SHOW_NAMETAG;$flags |= 1 << Entity::DATA_FLAG_ALWAYS_SHOW_NAMETAG;$flags |= 1 << Entity::DATA_FLAG_IMMOBILE;$pk->metadata = [Entity::DATA_FLAGS => [Entity::DATA_TYPE_LONG, $flags],Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, "text\ntext"],38 => [Entity::DATA_TYPE_LONG, -1],];$p->dataPacket($pk); To edit the text just resend the packet with an other text
Please if you don't know anything of Pocketmine don't answer xd (and check pm) Using setParticle return the same things mdrr
FloatingTextParticle is just an AddEntityPacket of an Item's entity. Spawn a human with AddPlayerPacket return to the same thing.
You use this function with a task without task your function does not work while with FloatingTextParticle the particle stays.
Please don't use GoogleTranslate i can't understand anything, thanks, oh and last things all you said is wrong.
PHP: public function updateTextParticle() { $this->position->level->addParticle($this->ftp); } public function addTextParticle() { $this->ftp = new FloatingTextParticle($this->position->add(0, 3), "", ""); } public function removeTextParticle() { $this->ftp->setInvisible(true); $this->position->level->addParticle($this->ftp); }
You do not want to know anything you show yourself when you do not know anything here is an example to help you.