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.
@DamianMMC
Perhaps you could learn to read? 3.2 fixes the issue.
@ericgolde555
Unfortunately invisibility potions do not work on ender dragons. Whether or not that in itself is a bug too, I don't know.
to many Errors: http://pastebin.com/rVj6k4cw
please fix this error :(
for the 1.8 client caveat, can you put a invisibility potion on the ender dragon so 1.8 clients don't see the enderdragon flying around?
Those that are messaging me about this 'issue' and also posting comments about it.
3.2 specifically states the following known caveat:
"Due to a client side bug with 1.8, the bar is only visible to a player if they are looking at the enderdragon. This means players will be able to see an enderdragon in the distance.
@RaeEU
I'm getting this same issue. When everything is setup i usually see the dragon in front of me instead of under the void
Note that after latest update from Developer builds, everyone sees an ender dragon flying far away. But the console error on Spigot 1.8 patches is fixed.
Hi,
please fix this error:
http://pastebin.com/MLhdFihr
It's nearly the same error like the errors of @tjbruce and @Tomas325.
Thanks for the fix and update! No more console error spam! :D
@Tomas325
Getting Same Error. Please Fix.
Please fix it: http://pastebin.com/g6KJ0c4P
@confuser
No way to code around it?
@ferrago
Client side bug. Pester Mojang/Microsoft to fix it.
@confuser
Sorry My last message was really meant to go to you. I am having an issue with the dragon appearing at eye level in the distance. Any quick fix? I am using spigot 1.7.10 latest. Using your latest version of bar api. Protocol hack is enabled.
@LihPeu
I am having players who see the dragon at eye level rather than being "faked" below ground. Known error? Is there a fix. It's kind of annoying to have players playing "catch the dragon that I can never catch" .
@Maxb00
Please pastebin your error http:pastebin.com/
@LihPeu
I am using the latest build of both, and I still get the error.
Please ensure you are using the latest patch of spigot and the latest build of BarAPI if your going to enable the config option "useSpigotHack: true".
I have this problem too.
Yes, I have a same problem, as lucasdidur has.
I changed the spigot hack to true, but the error is in the console.