Skip to content

Latest commit

 

History

History
49 lines (46 loc) · 1.37 KB

README.md

File metadata and controls

49 lines (46 loc) · 1.37 KB

bossbarapi

Screenshot_20220101-234521_Minecraft

pmmp 4.0 virion

how to use

Send BossBar

BossBarAPI::getInstance()->sendBossBar(Player $player, string $title, int $channel, float $percent, int $color);
//$channel is 0~

color list

BossBarAPI::COLOR_PINK
BossBarAPI::COLOR_BLUE
BossBarAPI::COLOR_RED
BossBarAPI::COLOR_GREEN
BossBarAPI::COLOR_YELLOW
BossBarAPI::COLOR_PURPLE
BossBarAPI::COLOR_WHITE

Change Title

you have to send BossBar already.

BossBarAPI::getInstance()->setTitle(Player $player, string $title, int $channel);

setPercent

you have to send BossBar already.

BossBarAPI::getInstance()->setPercent(Player $player, float $percent, int $channel);

hideBossBar

you have to send BossBar already.

BossBarAPI::getInstance()->hideBossBar(Player $player, int $channel = 0);

others

If you want to automatically delete player channel information when player left

BossBarHandler::autoDeleteData(Plugin $plugin);

Please be careful issue

If the world is unloaded, please delete the player channel information and send bossbar again

BossBarAPI::getInstance()->deleteData(Player $player);
BossBarAPI::getInstance()->sendBossBar(...)