How can I update FloatingTextParticle (I have $onlineplayer and would like to update FloatingText, but then I spawn new FloatingText with new information -> do nothing)
onEnable PHP: $this->getServer()->getScheduler()->scheduleRepeatingTask(new UpdateTask($this, $this->eid), 10);$this->eid = mt_rand(10000,100000); Main class PHP: //Item = use pocketmine\entity\Item;$pk = new AddEntityPacket();$pk->eid = $this->eid;$pk->type = Item::NETWORK_ID;$pk->x =X;$pk->y = Y;$pk->z = Z;$pk->metadata = [Entity::DATA_FLAGS => [Entity::DATA_TYPE_BYTE, 1 << Entity::DATA_FLAG_INVISIBLE],Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, $txt], //Here the you want textEntity::DATA_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE, 1],Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE, 1]]; to run, PHP: class UpdateTask extends PluginTask{ function __construct(PluginBase $owner, $eid){ $this->owner = $owner; $this->eid = $eid; } function onRun($tick){ $pk = new SetEntityDataPacket(); $pk->did = $this->eid; $pk->metadata = [Entity::DATA_FLAGS => [Entity::DATA_TYPE_BYTE, 1 << Entity::DATA_FLAG_INVISIBLE],Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, $txt], //Here the you want textEntity::DATA_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE, 1],Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE, 1]]; $this->owner->getServer()->broadcastPacket($this->owner->getServer()->getOnlinePlayers(), $pk); }}