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

Updating bossbar

Discussion in 'Development' started by Levi, Jun 24, 2018.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    how do i update bossbars without spawning another one
     
  2. Enes5519

    Enes5519 Spider Jockey

    Messages:
    28
    GitHub:
    Enes5519
    If you update title:
    PHP:
    $title "OK";
    $health 5;
    $eid 0;

    $pk = new BossEventPacket();
    $pk->bossEid $eid;
    $pk->eventType BossEventPacket::TYPE_TITLE;
    $pk->healthPercent $health;
    $pk->title $title;
    $player->dataPacket($pk);
     
    Kabluinc likes this.
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    is the title everything written in the bossbar?
     
  4. Enes5519

    Enes5519 Spider Jockey

    Messages:
    28
    GitHub:
    Enes5519
    No just title.
     
  5. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    so i put that in my task so it updates everytime
     
  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.