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.
@sirati97
would be a more appropriate title. Please ensure you release the source as per the licence terms.
Once the client side bug is fixed, I will release an official developer build specifically for the 1.8 Spigot hack.
I would recommend all users of this plugin, up-vote the following https://bugs.mojang.com/browse/MC-68062
BarAPI Hack for Spigot 1.8 Hack!
Hi guys i also use the spigot hack and have the console spam: My build actually fix it but only works with the spigot hack. Because a bug of minecraft i have to put the dragon 100 blocks above the player what avoid noise but show the dragon bar. Link: Spigot forum
Info: I Removed metrics and the auto updater.
DISREGARD this I read through the thread and seen it's a bug with Mojang.
@confuser
Is this also related to my warming in the console?
http://pastebin.com/Pa9sc5rV
@brunyman
Same problem here. Spigot latest using boss message plugin.
Oh sorry bro didn't see that there. I appreciate the response! Keep up the good work! Got a little confused if you know what I mean @confuserr
@confuser
can we get a fix for the error? even if it doesnt show up? my logs are getting massive
@drew5494
Learn to read please!
http://dev.bukkit.org/bukkit-plugins/bar-api/?comment=234
Fix for the Spigot 1.8 Hack please!!
@brunyman
https://github.com/confuser/BarAPI/pulls
There's already two pull requests with fixes. confuserr is just waiting until they (as in Mojang) fix the bar disappearing when the boss is out of your view.
Ok, but until that bug get's fixed can you fix this one please? http:pastebin.com/vWFLuPpU It's on spigot-1.7.10-R0.1-b1647.jar and i'm using plugin BossBar-1.1 It's doing heavy spam in the console. Thanks
@confuser
good point.. I hope that gets fixed
Whilst I can fix the stack trace with the spigot 1.8 protocol hack, the bar still won't be visible until the following client side bug is fixed:
https://bugs.mojang.com/browse/MC-68062
@confuser
Here's the decompiled packet class that's been causing problems: http://pastebin.com/b4eGetA2
Made a pull request with the necessary changes similar to what @Jalau suggested!
any 1.8 protocol version? I keep getting this http://pastebin.com/xVwsw6ZN
@confuser
I'm guessing not, as people make sense that if you can't see the dragon in the end you won't be able to see the health which seems stupid.
Any idea of what you can do if it is suppose to be like that?
@Jalau
For my server it doesn't work for the most part but if i play for a few minutes it starts working. However this is random. Also please update for 1.7.10 <3
@connorlinfoot
Decompiled Spigot, yeah :)
@smeths
It does, because if you teleport the player away, so that the boss is out of reach and the bossbar does not get changed, it will disapear until it is updatet with new text :)
And also i saw some server were the bossbar worked in 1.8 so there must be a way of accomplishing it :)
@confuser
just to let you know, the errors that were mentioned by @Squawkers13 don't stop it from working in any way, it's just really spammy in the console
@LordKainzo
Appears to have been reported as a bug.
https://bugs.mojang.com/browse/MC-68062
Awaiting on a response to see whether or not this change is intentional. I'm hoping not.
@Jalau
Where about did you find and change this? Was it in Spigot?
For Minecraft 1.8 clients...
It seems that the bosses can only be seen when the player has the boss in line of sight.
This is an issue for sure.