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

Bossbar help

Discussion in 'Plugin Help' started by chin tienway, Dec 9, 2019.

  1. chin tienway

    chin tienway Creeper

    Messages:
    2
    public static function setString(Player $player, string $message = ""){
    $packet = new SetEntityDataPacket();
    $packet->metadata[Entity::dATA_NAMETAG] = array(Entity::dATA_TYPE_STRING, $message);
    $packet->eid = BossManager::NETWORK_EID;
    $player->dataPacket($packet);
    unset($packet);
    $packet = new BossEventPacket();
    $packet->bossEid = BossManager::NETWORK_EID;
    $packet->eventType = BossEventPacket::TYPE_SHOW;
    $packet->playerEid = 0;
    $packet->healthPercent = 1;
    $packet->title = $message;
    $packet->unknownShort = 0;
    $packet->color = 0;
    $packet->overlay = 1;
    $player->dataPacket($packet);
    }

    BossManager::setString($player, $this->timer);

    Is not working. Im making bossbar timer
     
  2. chin tienway

    chin tienway Creeper

    Messages:
    2
    The dATA. d is cap. I dont make it cap in post because it return this emoji :D
     
  3. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    You can press the + button in the editor to insert a code block.
     
  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.