inxomnyaa / apibossbar

A simple virion API for Minecraft Bossbars for PocketMine-MP
https://poggit.pmmp.io/ci/thebigsmileXD/apibossbar/~
GNU General Public License v3.0
53 stars 21 forks source link

Forgot debug in console + removePlayers not functioning #1

Closed Amirgta1 closed 2 years ago

Amirgta1 commented 5 years ago

Hello when use addplayers,The following message will appear in the console im use this code: $bar = new BossBar(); $bar->setTitle("Hello world!"); $bar->setSubTitle("Foo Bar"); $bar->setPercentage(0.5); $players = $player->getLevel()->getPlayers(); $bar->addPlayers($players); But the plugin works Thank you for your great plugin array(7) { [0]=> array(2) { [0]=> int(7) [1]=> int(562949953617952) } [42]=> array(2) { [0]=> int(1) [1]=> int(400) } [4]=> array(2) { [0]=> int(4) [1]=> string(21) "Hello world!

Foo Bar" } [37]=> array(2) { [0]=> int(7) [1]=> int(-1) } [38]=> array(2) { [0]=> int(3) [1]=> float(0) } [53]=> array(2) { [0]=> int(3) [1]=> float(0) } [54]=> array(2) { [0]=> int(3) [1]=> float(0) } } and how delete bossbar? removeplayers dont work tested in pocketmine-mp 3.5.13

inxomnyaa commented 5 years ago

Oh, its just a debug of the attributes, forgot to remove it. Deleting is done via removeAllPlayers(). Note that the entity will be removed client side, but the bar object will still exist and be useable.