Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sky-min/bossbarapi
pmmp 4.0 bossbarapi virion
https://github.com/sky-min/bossbarapi
bossbarapi pmmp pocketmine
Last synced: 3 months ago
JSON representation
pmmp 4.0 bossbarapi virion
- Host: GitHub
- URL: https://github.com/sky-min/bossbarapi
- Owner: sky-min
- License: mit
- Created: 2021-12-06T07:31:24.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-28T21:08:00.000Z (over 1 year ago)
- Last Synced: 2024-09-27T10:01:57.890Z (3 months ago)
- Topics: bossbarapi, pmmp, pocketmine
- Language: PHP
- Homepage: https://poggit.pmmp.io/ci/sky-min/bossbarapi/bossbarapi
- Size: 34.2 KB
- Stars: 24
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bossbarapi
![Screenshot_20220101-234521_Minecraft](https://user-images.githubusercontent.com/81374952/147854399-6c663dfe-786e-4298-902d-5b72edf066f9.jpg)pmmp 4.0 virion
# how to use
## Send BossBar
```php
BossBarAPI::getInstance()->sendBossBar(Player $player, string $title, int $channel, float $percent, int $color);
//$channel is 0~
```
color list
```php
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.**
```php
BossBarAPI::getInstance()->setTitle(Player $player, string $title, int $channel);
```
## setPercent
**you have to send BossBar already.**
```php
BossBarAPI::getInstance()->setPercent(Player $player, float $percent, int $channel);
```
## hideBossBar
**you have to send BossBar already.**
```php
BossBarAPI::getInstance()->hideBossBar(Player $player, int $channel = 0);
```
## others
**If you want to automatically delete player channel information when player left**
```php
BossBarHandler::autoDeleteData(Plugin $plugin);
```
**Please be careful**
[issue](https://github.com/sky-min/bossbarapi/issues/5)If the world is unloaded, please delete the player channel information and send bossbar again
```php
BossBarAPI::getInstance()->deleteData(Player $player);
BossBarAPI::getInstance()->sendBossBar(...)
```