Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to remove FloatingTextParticle?

Comments in 'Plugin Development' started by BlackJIeBPlayer, Jun 21, 2015.

  1. BlackJIeBPlayer
    Offline

    BlackJIeBPlayer New Member

    Joined:
    May 19, 2015
    Posts:
    18
    Minecraft User:
    BlackJIeB
    Hi, people. Wanted to ask a question. There is code to remove FloatingTextParticle?
    In the sense to remove them after they appeared.
  2. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    You need to do setInivisble, then addParticle
    .
  3. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    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);
    BlackJIeBPlayer likes this.
  4. BlackJIeBPlayer
    Offline

    BlackJIeBPlayer New Member

    Joined:
    May 19, 2015
    Posts:
    18
    Minecraft User:
    BlackJIeB
    wooow, very, very thanks! :з
  5. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    finally i can now finish my HoloShop! thanks :3
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    * $level->addParticle($particle) xD
  7. BlackJIeB
    Offline

    BlackJIeB New Member

    Joined:
    Oct 12, 2014
    Posts:
    28
    Minecraft User:
    BlackJIeB
    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?
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    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.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Unset? This isn't C++ :D
  10. BlackJIeB
    Offline

    BlackJIeB New Member

    Joined:
    Oct 12, 2014
    Posts:
    28
    Minecraft User:
    BlackJIeB
    To be honest, I don't understand :(
  11. LCraftPE
    Offline

    LCraftPE New Member

    Joined:
    Nov 16, 2014
    Posts:
    30
    Minecraft User:
    LCraftPE
    For me, it doesn't work...
    PHP:
    $particle = new FloatingTextParticle(new Vector3(10313129), "TEXT""TITLE");
    $particle->setInvisible(true);
    $this->getServer()->getDefaultLevel()->addParticle($particle);
  12. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    \
    try
    PHP:
    $particle = new FloatingTextParticle(new Vector3(10313129), "TEXT""TITLE");
    $this->getServer()->getDefaultLevel()->addParticle($particle);
    $particle->setInvisible(true);
    $this->getServer()->getDefaultLevel()->addParticle($particle);
  13. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    Бля, че ты не понимаешь? Сказали что Floating text particle нужно обновить и ЗАНОВО ОТПРАВИТЬ ПАКЕТ ИГРОКУ, ЧТОБ ОН УВИДЕЛ ИЗМЕНЕНИЯ
    Primus likes this.
  14. LCraftPE
    Offline

    LCraftPE New Member

    Joined:
    Nov 16, 2014
    Posts:
    30
    Minecraft User:
    LCraftPE
    It doesn't work... :x

Share This Page

Advertisement