This repository has been archived by the owner on Sep 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
BossbarAPI
Emre Yavuzyiğit edited this page Jun 20, 2018
·
12 revisions
Altay's bossbar api is very simple! Lets read the blog.
$title = "title"; // optional, default value: Altay Bossbar API
$currentHealth = 1; // optional, default value: 1
$maxHealth = 1; // optional, default value: 1
$bossbar = new Bossbar($title, $currentHealth, $maxHealth);
$currentHealth = 1;
$maxHealth = 1; // optional
$bossbar->setHealthPercent($currentHealth, $maxHealth); // fill this bossbar
$bossbar->setTitle("test");
$bossbar->showTo($player);
$bossbar->hideFrom($player);
Other Funtions of Bossbar:
$bossbar->getTitle(); // type: string , gets title
$bossbar->getHealthPercent(); // type: float , gets current health percentage
$bossbar->getMaxHealthPercent(); // type: float , gets maximum health percentage
$bossbar->getViewers(); // type: array , gets viewers of bossbar
$bossbar->updateForAll(); // updates bossbar to viewers, (internal use)
End.
Yup, that's it. It's that simple 😄 .