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.
http://pastebin.com/Pu2QCcFr
Spigot-1.7.9-R0.2-205-g48578ee Latest DEV on your jenkins.
With the following settings: autoUpdate: false testMode: false useSpigotHack: true
@apesgrapes
Ensure auto update is false as well. I've just pushed a commit to disable it by default when the config file is created.
@apesgrapes
Ensure useSpigotHack is set to true in your config.yml, then restart the server.
I'm using it on 9 servers without any problems.
@confuser
thx, get a pretty big error as players join but plugin working. as its just a temp fix i haven't raised a ticket (let me know if you want one).
cheers
http://pastebin.com/0n0QnVK8
@brunyman
http://ci.frostcast.net/job/BarAPI/
Make sure useSpigotHack is set to true. Requires a server restart.
Can someone tell us where to get that 3.2 snapshot? thanks
hi, also struggling to find the 3.2 snapshot (browsing the repo show above under Maven).
can anyone point me to it?
thx.
@goldvcc
Perfect thanks broo! Anyone with Spigot 1.7/1.8 I highly recommend this plugin: http://www.spigotmc.org/resources/bossbarapi.1142/
@confuser
Thank you very much!
Edit: Uhhm... How are you compiling your code? I forked your repo so I can edit things myself and compile it myself, but (of course) it does not find the dependencies of Bukkit.
@confuser
Can Withers be invisible?
@confuserr
Where exactly is the updated repo for the Spigot Hack, I'm new to this and just getting used to this stuff. DO i have to do something to the Spigot hack?
@Squawkers13
Dragons can't be invisible.
I've updated the repo with 3.2-SNAPSHOT which contains a fix for the spigot hack. However, players can see the enderdragon.
I spent most of the day yesterday trying to switch to a wither, however I just couldn't remove the particles or shield effect it has when it goes below 50% health.
What about this?
http://www.spigotmc.org/resources/bossbarapi.1142/
@confuser
Maybe you could change it so an invisible dragon is always in front of the player? (It uses packets, right?)
When do you think the bug will be fixed?
Sorry for asking that again, but we need the plugin updated so the errors are fixed. If you just could upload it to your maven repo, this would be super-awesome!
@sirati97
Countdown timer on my server doesn't update, still have to look up at the dragon. Neat hack, though!
@confuser
Yes of course fixing the bug is the right way, but don't update is bad for the servers that need BarAPI as mine. so i update the plugin for myself and think why not sharing it.
@LucasRoxMinecraft
This is an API which other plugins depend on. It does nothing on its own.
i put BarAPI.jar into my plugins folder but it did not work, i am running it on a 1.7.9 bukkit server, does it need another plugin to run it??? i tryed it on 1.6.4 and it worked but my config.yml has only 3 lines in it, is it suposed to??