BarAPI
BarAPI

Server Owners
This plugin does nothing on its own. It is simply an API for other plugins to implement with.
Developers
Simply add BarAPI.jar to your project build path.
This plugin makes use of reflection and therefore "shouldn't" break on craftbukkit updates.
Limitations
The message can not be more than 64 characters. If it is more, BarAPI will automatically cut it to 64 characters to prevent the client from crashing.
This is a client limitation and cannot be changed.
Examples
BarAPI.setMessage(Player player, String message)
Set a message for the player. It will remain there until the player logs off or another plugin overrides it.
BarAPI.setMessage(Player player, String message, float percent)
Same as above except you can set the % of the health bar. 100 shows the entire health bar, 50 shows half the health bar and so on.
BarAPI.setMessage(final Player player, String message, int seconds)
Sets a timed message for the player. It will remain until the timer runs out. The health automatically reduces based on how long the timer is.
BarAPI.hasBar(Player player)
Pretty self explanatory, returns a boolean.
BarAPI.removeBar(Player player)
Also pretty self explanatory.
BarAPI.setHealth(Player player, float percent)
Allows you to modify the health of an existing bar. If the player has no bar, this does nothing.
Tutorials
Source
Maven
<repositories> <repository> <id>confuser-repo</id> <url>http://ci.frostcast.net/plugin/repository/everything</url> </repository> </repositories> <dependencies> <dependency> <groupId>me.confuser</groupId> <artifactId>BarAPI</artifactId> <version>3.0</version> </dependency> </dependencies>
Developer Builds
These builds have not been approved by BukkitDev staff, therefore, use at your own risk.
Updater
This plugin contains an auto updater which is enabled by default. If you do not wish to automatically download new updates, edit BarAPI/config.yml and set autoUpdate to false.
To Dos
- Scroll messages if string is greater than 64 characters.
Plugins Using BarAPI
Metrics
To determine popularity and usage of BarAPI, plugin installs are automatically tracked by the Metrics plugin tracking system. Your Java version, OS, player count, server country location and plugin & server versions are collected. This is used to determine what environments are using the plugin to ensure full compatibility. This collection is anonymous. If you don't want this tracking, edit plugins/PluginMetrics/config.yml and set opt-out to true.

-
View User Profile
-
Send Message
Posted Jun 30, 2014Small Question:
Can you use the API from an Async Thread? That would speed up things pretty much ;)
-
View User Profile
-
Send Message
Posted Jun 29, 2014Is there anybody else that have a lot of client lags ?
-
View User Profile
-
Send Message
Posted Jun 25, 2014@Xikage
Same problem. But for me it doesnt decrease and just dissapears when the time is finished.
-
View User Profile
-
Send Message
Posted Jun 20, 2014The timer method no longer seems to work on 1.7.9:
BarAPI.setMessage(final Player player, String message, int seconds)
When used it displays a bar for a brief moment that immediately goes away. Any ideas?
-
View User Profile
-
Send Message
Posted Jun 19, 2014Hi, i'm the owner of a server.
But we are cracked.
Can you update the plugin so it does not convert the uuid's instead of the playername.
Our server version is 1.7.5.
Thanks already
-
View User Profile
-
Send Message
Posted Jun 19, 2014@Speedy0001
It should be working with 1.7.9? Have you even tried?
-
View User Profile
-
Send Message
Posted Jun 18, 2014Pls update to 1.7.9
-
View User Profile
-
Send Message
Posted Jun 16, 2014@confuser
BossBar is always not in real center. Example: http://prntscr.com/3taxfz (by default, few spaces in the beginning resolves problem, nevermind).
-
View User Profile
-
Send Message
Posted Jun 16, 2014@wiedzmin137
What additional space?
-
View User Profile
-
Send Message
Posted Jun 15, 2014Hello.
Is there possibility to delete additional space behind of the BossBarMessage?
-
View User Profile
-
Send Message
Posted Jun 5, 2014@confuser
I figured it out why that was happening, it was just because I were trying to teleport the Player to a null Location :)
-
View User Profile
-
Send Message
Posted Jun 5, 2014@RaynLegends
Can you provide the full stack trace please
-
View User Profile
-
Send Message
Posted Jun 4, 2014@confusser
I get an NPE while trying to teleport a Player between two worlds:
Caused by: java.lang.NullPointerException at me.confuser.barapi.BarAPI.onPlayerTeleport(BarAPI.java:98) [and other "at" that aren't important]
The bar is currently "active" and showing a message and the player is online. That's all I know...
Oh, and there's another dragon in the world.
-
View User Profile
-
Send Message
Posted Jun 2, 2014Can you make so it automatically broadcasts a new Message in a certain time period?
-
View User Profile
-
Send Message
Posted May 21, 2014@MiCrJonas1997
Mal so als Tipp: mach doch einfach:
Müsste auch gehen!
-
View User Profile
-
Send Message
Posted May 21, 2014Hello, can you please add to set the bar for only a specific world? Would be nice! Thanks, buddy :)
BarAPI.setMessage(Player player, String message, World world)
-
View User Profile
-
Send Message
Posted May 21, 2014OK no problem. If they don´t wont to download it, they will not have it! :-)
But what do you mean with shade? I´m from Germany so I don´t understand it!
-
View User Profile
-
Send Message
Posted May 21, 2014@Mineraftair
Whilst you could shade the plugin in, it is better to ask them to download the .jar. Otherwise your users will have to wait for you to update BarAPI within your plugin if any changes are required when 1.8 is released, instead of it auto-updating when I update it.
-
View User Profile
-
Send Message
Posted May 20, 2014My plugin supports your plugin (ServerAdministrationManager). Your plugin is really nice!
One more question: Can I add your code in my plugin and name your name in the description of my plugin? It will be easier for my users!
-
View User Profile
-
Send Message
Posted May 13, 2014Can you make it come ALREADY SET UP because i have no FKING idea ON WHAT TO DO