Sources of Api Bossbar for PocketMine-MP.

Overview

Voltage logo

Voltage-Groups

Discord
----------------------

Info

Note: The main branch may be in an unstable or even broken state during development.


Versions they are available here
Branch stable for PM4 PM3

Api

A very basic example can be seen here: BossBarHud

Create a new boss bar

/** @var int */
$id = BossBarApi::getManager()->createBossBar(); //you can define an id if you want
/** @var BossBar */
$bossbar = BossBarApi::getManager()->getBossBar(BossBarApi::getManager()->createBossBar());

Send a boss bar

$bossbar->sendToPlayers(array $players);
$bossbar->sendToAll();

Set the title and/or subtitle and/or percentage

setTitleToPlayers(array $players, string $title = ""); /** @var BossBar */ $bossbar->setSubTitleToAll(string $subTitle = ""); $bossbar->setSubTitleToPlayers(array $players, string $subTitle = ""); /** @var BossBar */ $bossbar->setPercentageToAll(float $percentage = 0); //value between 0.00 and 1.00 $bossbar->setPercentageToPlayers(array $players, float $percentage = 0); //value between 0.00 and 1.00">
/** @var BossBar */
$bossbar->setTitleToAll(string $title = "");
$bossbar->setTitleToPlayers(array $players, string $title = "");
/** @var BossBar */
$bossbar->setSubTitleToAll(string $subTitle = "");
$bossbar->setSubTitleToPlayers(array $players, string $subTitle = "");
/** @var BossBar */
$bossbar->setPercentageToAll(float $percentage = 0); //value between 0.00 and 1.00
$bossbar->setPercentageToPlayers(array $players, float $percentage = 0); //value between 0.00 and 1.00

Set the Color

//The entire color palette
BossBar::COLOR_PINK
BossBar::COLOR_BLUE
BossBar::COLOR_RED
BossBar::COLOR_GREEN
BossBar::COLOR_YELLOW
BossBar::COLOR_PURPLE
BossBar::COLOR_WHITE

/** @var BossBar */
$bossbar->setColorToAll(BossBar::COLOR_BLUE);
$bossbar->setColorToPlayers(array $players, BossBar::COLOR_BLUE);

Add and remove players

$bossbar->addPlayer(Player $player);
$bossbar->removePlayer(Player $player);

/** @var Player[] $players */
$bossbar->addPlayers(array $players);
$bossbar->removePlayers(array $players);
$bossbar->removeAllPlayers();

Get the entity the boss bar is assigned to

/** @var Entity|Player $entity */
$bar->getEntity();

Example

setTitleToAll("Welcome") ->setSubTitleToAll("to BossBar API") ->setPercentageToAll(0.5) ->setColorToAll(BossBar::COLOR_GREEN) ->addPlayers(Server::getInstance()->getOnlinePlayers()) ->setColorToPlayers([$player], BossBar::COLOR_PINK) ->sendToAll();">
$bossBar = BossBarApi::getManager()->getBossBar(BossBarApi::getManager()->createBossBar());
$player = Server::getInstance()->getPlayerExact("voltage");
$bossBar
    ->setTitleToAll("Welcome")
    ->setSubTitleToAll("to BossBar API")
    ->setPercentageToAll(0.5)
    ->setColorToAll(BossBar::COLOR_GREEN)
    ->addPlayers(Server::getInstance()->getOnlinePlayers())
    ->setColorToPlayers([$player], BossBar::COLOR_PINK)
    ->sendToAll();

Contents

Usages

Community

Active channels:



© Voltage-Groups

Voltage-Groups are not affiliated with Mojang. All brands and trademarks belong to their respective owners. Voltage-Groups is not a Mojang-approved software, nor is it associated with Mojang.

You might also like...
API server and modernized control panel for PocketMine servers.

WebConsole API server and modernized control panel for PocketMine servers. The WebConsole plugin provides an HTTP API server that can be extended with

Dedicated plugin for PocketMine-API 4, this will help staff members to make players follow the rules to the letter

StaffMode Dedicated plugin for PocketMine-API 4, this will help staff members to make players follow the rules to the letter Annotation This plugin is

Simple Plugin to Light Redstone Lamps with one click for PocketMine-MP API 4.

TouchLight-PM4 Simple plugin to light redstone lamps with one click! Category PocketMine-MP plugins | PHP 8 Requirements PocketMine-MP API 4.0.0 and P

A PocketMine/Altay Plugin to morph yourself into a block
A PocketMine/Altay Plugin to morph yourself into a block

BlockMorph A PocketMine/Altay Plugin to morph yourself into a block Command To morph yourself into a block use this command: /blockmorph [BlockID|Bloc

A useful PocketMine-MP plugin that allows you to create crates in-game!

ComplexCrates A useful PocketMine-MP plugin that allows you to create crates in-game! Commands Main command: /crate Sub commands: create

A plugin to add more blocks to PocketMine

This plugin aims to add all blocks not included in PocketMine. As of right now the ExtendedBlocks plugin is required to add blocks with IDs above 255.

This Pocketmine-MP plugin is a plugin including a complete faction system.

SimpleFaction Simple faction plugin replacing FactionsPro which is no longer updated. Commands Command Name Command Description Available for /f help

✨An Ultimate NPC plugin made by brokiem for PocketMine-MP.
✨An Ultimate NPC plugin made by brokiem for PocketMine-MP.

SimpleNPC An Ultimate NPC plugin made by brokiem for PocketMine-MP. ✨ Features Migration from Slapper supported! ✔ Right click to interact! ✔ NPC can

Plot and protection plugin for PocketMine-MP
Plot and protection plugin for PocketMine-MP

MyPlot Create, manage, and build in protected plots. Keep your builds safe from griefers! Official MyPlot precompiled builds can be found on Poggit at

Comments
  • The problem with remove the BossBar from the Player

    The problem with remove the BossBar from the Player

    How to remove the BossBar from the Player? I am using the removePlayer() function, but the BossBar is not removed from the Player.

        foreach($this->getServer()->getOnlinePlayers() as $players){
            $name = strtolower($players->getName());
    
            $id = BossBarApi::getManager()->createBossBar(57);
            $bossBar = BossBarApi::getManager()->getBossBar($id);
    
            if(isset($this->combat[$name])){
                $time = $this->combat[$name] - time() - 1;
                if($time > 0){
                    $bossBar
                        ->addPlayer($players)
                        ->setTitleToPlayers([$players], "PvP Mode Time {$time}")
                        ->sendToPlayers([$players]);
                }else{
                    unset($this->combat[$name]);
                    $bossBar->removePlayer($players);
                    $players->sendMessage("You have exited combat mode."); // message is being sent.
                }
            }
        }
    
    bug high-priority 
    opened by sergiy-morning 1
Releases(stable3)
Owner
VoltageGroup's
Sources of Voltage-Groups server for Minecraft Bedrock Edition
VoltageGroup's
Mega list of 1 on 1 meeting questions compiled from a variety to sources

Mega list of 1 on 1 meeting questions compiled from a variety to sources

Vidal Graupera 9.1k Dec 29, 2022
Demo Silverstripe and JavaScript sources for Lightning Talk "FormField Mini Apps" at StripeCon EU 2022

Watch the Lightning Talk on Youtube ?? Demo repository for Lightning Talk "FormField Mini Apps with the JavaScript framework/lib/style of your choice"

Julian Scheuchenzuber 2 Sep 20, 2022
A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

thebigcrafter 6 Jan 4, 2023
This is a plugin written in PHP programming language and running on the PocketMine platform that works stably on the API 3.25.0 platform

This is a plugin written in PHP programming language and running on the PocketMine platform that works stably on the API 3.25.0 platform. It allows you to hear the sound

Thành Nhân 10 Sep 27, 2022
CorePlugin für Pocketmine API 4.0.0

CoreV6 ALPHA Für Pocketmine API 4.0 Du willst helfen? Hier mein Discord! Download und Wichtig Hier downloaden! Das Core Plugin wurde speziell für City

TheNote 12 Dec 15, 2022
pocketmine plugin API 4.0.0

About [FR] Simple plugin configurable comportant plusieurs commandes | Plugin en developpement, d'autres commandes seront rajoutés par la suite [ENG]

Achedon12 1 Feb 5, 2022
EmoteSimple is a Feature or API for PocketMine-MP 4.0+

EmoteSimple EmoteSimple is a Feature or API for PocketMine-MP 4.0+ Permission This feature next update.. Support You can use minecraft bedrock profile

Ibenrm 4 Nov 24, 2022
pocketmine plugin API 4.0.0

About [FR] Simple plugin configurable permettant de voir toutes les commandes exécutées par les joueurs [ENG] Simple configurable plugin to see all co

Achedon12 1 Feb 4, 2022
A skywar minegames plugin for PocketMine API 4.0

A skywar minegames plugin for PocketMine API 4.0

Arisify 7 Jun 19, 2022
Pocketmine BadWord Blocker Plugin. (API 4)

BadWord Pocketmine BadWord Blocker Plugin. (API 4) Usage Go to plugin_data/BadWord/data.yml You can set bad words from inside the data.yml file Badwor

Hakan 2 Jun 5, 2022