1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Spawning particles on onEnable()?

Discussion in 'Development' started by Levi, Apr 6, 2019.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    FTP not spawning on onEnable()

    First, I load worlds
    Then load chunks where particles are supposed to spawn

    And I addParticle()

    But no particle is added when I joined. Why?
     
  2. KielKing

    KielKing Zombie

    Messages:
    245
    GitHub:
    kielking
    the particle can only be seen by players who are currently on the server when you spawned it, you should spawn particles for that specific player when they join
    PHP:
    /** on player join */
    /** @var Level $level */
    /** @var FloatingTextParticle $particle */
    /** @var Player $player */
    $level->addParticle($particle, [$player]);
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.