Sueta

MasterBarAPI

1.0.1

API to put messages on bossbar | Can be used as a standalone with a constant message

·Plugin

Master Bar API

Why ?

The whole purpose of this plugin is to give people access to a quite easy to use API in order to manipulate boss bars in 1.7.x and 1.8.x ( according to my tests, might work on older versions but i don't guarantee it ) without any lags or server-related issues because it is totally managed by sending directly packets to the client, no entity are directly created server-side

The plugin as a Standalone

If there is no other plugin using the MasterBarAPI
The plugin will solely give a bossbar at 100% with a preconfigured message
who will be constant until the configuration is changed and the server reloaded.

The plugin as an API

In order to use the bossbar at your convenience.
You have to notice that the API gives the default Bossbar at the

PlayerJoinEvent

If you do want to modify the Bossbar or interact in any way with it you should give a lower Event Priority than

EventPriority.HIGH

Here are all the possible interactions with the API :

MasterBossBar api = MasterBossBar.HookOnAPI(); 
api.hasBossBar(Player p); // Returns a boolean 
api.getBossBar(Player p); // returns directly the BossBar be cautious with the uses of this one 
api.createBossBar(Player p,String text, float percent); // the text and the percentage of the bossbar ( from 0.05f to 1.0f even though it accept higher values they are rounded to the closest possible value ) 
api.modifyBossBar(Player p,String text,float percent); // Edit an already existent bossbar 
api.removeBossBar(Player p); // Quite obvious ( be cautious the API removes automatically the BossBar once player disconnects )

Compatible plugins

My Personal plugins:
Faction boss bar hook ( https://www.spigotmc.org/resources/faction-boss-bar-hook.72973/ )

You might consider sending me a message if you make a public plugin that uses the API so that i add it to the list

Future updates ?

Let me know about anything that'll be nice to add on MasterBarAPI.
Hope you guys appreciate my work.
Please let some reviews to let me know about your experience using the plugin.

Similar projects

Plugin →