Hi, people. Wanted to ask a question. There is code to remove FloatingTextParticle? In the sense to remove them after they appeared.
PHP: // $particle contains the particle you created with new FloatingTextParticle)// $level is the level you created the particle.$particle->setInvisible();$level->addParticle($level);// if you are not gonna use it again..unset($particle);
Hello, Aliuly! :3 Today I have seriously decided to do this, which is why I would like to ask in more detail: As I understand it, $particle - particle in an abbreviated form. Specifically: $particle = $event->getPlayer()->$level->addParticle(new ...(vector)... After that is $particle->setInvisible() So? I understood everything correctly?
Note that setInvisible itself does not do anything. You have to send it to the player again. FloatingTextParticle isn't a particle. It is a dropped item of item ID 0.
For me, it doesn't work... PHP: $particle = new FloatingTextParticle(new Vector3(103, 13, 129), "TEXT", "TITLE");$particle->setInvisible(true);$this->getServer()->getDefaultLevel()->addParticle($particle);
\ try PHP: $particle = new FloatingTextParticle(new Vector3(103, 13, 129), "TEXT", "TITLE");$this->getServer()->getDefaultLevel()->addParticle($particle);$particle->setInvisible(true);$this->getServer()->getDefaultLevel()->addParticle($particle);
Бля, че ты не понимаешь? Сказали что Floating text particle нужно обновить и ЗАНОВО ОТПРАВИТЬ ПАКЕТ ИГРОКУ, ЧТОБ ОН УВИДЕЛ ИЗМЕНЕНИЯ