{"id":15143005,"url":"https://github.com/inxomnyaa/apibossbar","last_synced_at":"2025-10-24T13:04:17.801Z","repository":{"id":38461074,"uuid":"190287218","full_name":"inxomnyaa/apibossbar","owner":"inxomnyaa","description":"A simple virion API for Minecraft Bossbars for PocketMine-MP","archived":false,"fork":false,"pushed_at":"2025-04-17T02:04:55.000Z","size":43,"stargazers_count":54,"open_issues_count":0,"forks_count":20,"subscribers_count":3,"default_branch":"pm5","last_synced_at":"2025-09-27T09:03:27.614Z","etag":null,"topics":["api","boss-bar-api","bossbar","bossbarapi","composer","composer-library","composer-package","hacktoberfest","minecraft","oop","packagist","pmmp","pmmp-virion","title","virion"],"latest_commit_sha":null,"homepage":"https://poggit.pmmp.io/ci/thebigsmileXD/apibossbar/~","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inxomnyaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-04T22:20:17.000Z","updated_at":"2025-09-03T00:05:15.000Z","dependencies_parsed_at":"2025-02-08T22:32:00.541Z","dependency_job_id":"591e8231-187e-419f-a5be-6358aef35a31","html_url":"https://github.com/inxomnyaa/apibossbar","commit_stats":null,"previous_names":["inxomnyaa/apibossbar","thebigsmilexd/apibossbar"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/inxomnyaa/apibossbar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inxomnyaa%2Fapibossbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inxomnyaa%2Fapibossbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inxomnyaa%2Fapibossbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inxomnyaa%2Fapibossbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inxomnyaa","download_url":"https://codeload.github.com/inxomnyaa/apibossbar/tar.gz/refs/heads/pm5","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inxomnyaa%2Fapibossbar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280799422,"owners_count":26393089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","boss-bar-api","bossbar","bossbarapi","composer","composer-library","composer-package","hacktoberfest","minecraft","oop","packagist","pmmp","pmmp-virion","title","virion"],"created_at":"2024-09-26T10:01:04.308Z","updated_at":"2025-10-24T13:04:17.795Z","avatar_url":"https://github.com/inxomnyaa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apibossbar\nA simple api virion to create, send, modify and use Minecraft's boss mob indicator bars in Plugins for PocketMine-MP\n## Advantages\nIt is quite easy to use this API\n- It uses a single object\n- Fluent setters (use multiple functions in 1 line)\n- Cleaner code\n- Easier to understand\n- No worrying about the used entity id\n- 2 types of bars (BossBar is same for all players, DiverseBossBar can be modified per player)\n- No \"API::function()\" calls, just object methods\n- Changeable entity (Can be used for actual boss mobs i.e.)\n## Types\nThere are 2 types of boss bars.\n- BossBar: is used for shared data, so all registered players see the same bar.\n- DiverseBossBar: is used for unique data, their data can be changed per player. They can also be set in a batch for multiple players, and will use default values if no specific data is set for a player. The default data is set like on a shared BossBar\n## API \u0026 usage\nA very basic example can be seen here: [BossBarTest](https://github.com/thebigsmileXD/BossBarTest). For a more advanced example you could check out [BossAnnouncement](https://github.com/thebigsmileXD/BossAnnouncement)\n\nCreate a new boss bar\n```php\n/** @var BossBar */\n$bar = new BossBar();\n```\nSet the title and/or subtitle\n```php\n$bar-\u003esetTitle(string $title = \"\");\n$bar-\u003esetSubTitle(string $subTitle = \"\");\n```\n\nSet the color\n\n```php\n// Available Colors:\n// PINK,BLUE,RED,GREEN,YELLOW,PURPLE,REBECCA_PURPLE,WHITE\n$bar-\u003esetColor(pocketmine\\network\\mcpe\\protocol\\types\\BossBarColor::RED);\n```\nSet the fill percentage\n```php\n// Half-filled\n$bar-\u003esetPercentage(0.5);\n```\nAdd and remove players\n```php\n// Single\n$bar-\u003eaddPlayer(Player $player);// This will spawn the bar to the player\n$bar-\u003eremovePlayer(Player $player);\n// Multiple\n/** @var Player[] $players */\n$bar-\u003eaddPlayers(array $players);\n$bar-\u003eremovePlayers(array $players);\n$bar-\u003eremoveAllPlayers();\n```\nHide and show bar\n```php\n/** @var Player[] $players */\n$bar-\u003ehideFrom(array $players);\n$bar-\u003eshowTo(array $players);\n```\nGet and set the entity the bar is assigned to\n```php\n/** @var Entity|Player $entity */\n$bar-\u003egetEntity();\n$bar-\u003esetEntity(Entity $entity);\n$bar-\u003eresetEntity();\n```\nSingle line example\n```php\n/** @var Player $player */\n$player = Server::getInstance()-\u003egetPlayerByName(\"Steve\");\n/** @var BossBar */\n$bar = (new BossBar())-\u003esetTitle(\"Hello world!\")-\u003esetSubTitle(\"Foo Bar\")-\u003esetPercentage(0.5)-\u003eaddPlayer($player);\n```\n---\n**DiverseBossBar has some additional methods to set data per player:**\n\nReset the data to its defaults\n```php\n$bar-\u003eresetFor(Player $player);\n$bar-\u003eresetForAll();\n```\nSet \u0026 get title for players\n```php\n/** @var Player[] $players */\n$bar-\u003esetTitleFor(array $players);\n$bar-\u003esetSubTitleFor(array $players);\n$bar-\u003egetTitleFor(Player $player);\n$bar-\u003egetSubTitleFor(Player $player);\n$bar-\u003egetFullTitleFor(Player $player);// Combined and encoded title \u0026 subtitle\n```\nSet percentage for players\n```php\n/** @var Player[] $players */\n$bar-\u003esetPercentageFor(array $players);\n$bar-\u003egetPercentageFor(Player $player);\n```\n## Disclaimer \u0026 Information\nCoded and maintained by XenialDan\n\nFeel free to open issues with suggestions and bug reports. Please leave as much information as possible to help speeding up the debugging of the issues.\n\nThis is a full rework of [BossBarAPI](https://github.com/thebigsmileXD/BossBarAPI). Plugins that used this virion should be upgraded to apibossbar ASAP\n\nColors and overlays do not work due to not being properly implemented in the client (They use data from the resource pack definitions file). #blamemojang for copy-paste leftovers from Minecraft: Java Edition","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finxomnyaa%2Fapibossbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finxomnyaa%2Fapibossbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finxomnyaa%2Fapibossbar/lists"}