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 Apr 8, 2015Plugin MEGA Spam || Issues
The plugin is spamming my console like CRAZY. And the most important the dragon get spawns not far from the players and they can see him...
Can someone please help me? (Yes i am using the spigot 1.8.x & 1.7.x server version and the config has that enabled!)
Thanks in advance.
-
View User Profile
-
Send Message
Posted Apr 7, 2015@ferrago
Right...
-
View User Profile
-
Send Message
Posted Apr 6, 2015@gpotter2
We also know the fix won't be distributed till 1.9 which is ass
-
View User Profile
-
Send Message
Posted Apr 2, 2015Hey !
Look what i found:
https://twitter.com/Dinnerbone/status/557169156408492032
That would be AMAZING (when 1.9 will be relased) to add it :)
And anyway, with this:
https://bugs.mojang.com/browse/MC-68062
We know it has been resolved...
-
View User Profile
-
Send Message
Posted Mar 30, 2015It wont work on my Spigot 1.8.3 server
-
View User Profile
-
Send Message
Posted Mar 24, 2015I'm usually one to say "It's better than nothing", but being able to see the enderdragon + hearing its wings is a bit overkill. Thanks for your hard work though.
-
View User Profile
-
Send Message
Posted Mar 15, 2015Possible to spawn the dragon under the ground ?
-
View User Profile
-
Send Message
Posted Mar 14, 2015@Roxas156
Your server is too old for the plugin. Use 1.7.10 or up for BarAPI v3.3.
-
View User Profile
-
Send Message
Posted Mar 9, 2015BarAPI UFO BUG
xD WTF!? This scared me the first time ... accompanied by the noise of aliens ... but it was awesome ... then I get disconnected when the light came to me ... you can create some plugin to add aliens? I have no idea how to repeat the bug. but I know comes from barAPI. because the bar appeared and disappeared quickly. This light seemed to move arbitrarily. and when he was near started to hear the noise of ender dragon wings flapping very quickly and could see the smoke of thousands of small explosions of ender dragon.
-
View User Profile
-
Send Message
Posted Mar 4, 2015Hello excuse me but when I stop the server I've this usue,
[22:20:28 INFO]: [BarAPI] Disabling BarAPI v3.3 [22:20:28 ERROR]: Error occurred while disabling BarAPI v3.3 (Is it up to date?)
java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()Ljava/util/Coll ection; at me.confuser.barapi.BarAPI.onDisable(BarAPI.java:98) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:318) [m inecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoade r.java:348) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManag er.java:423) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginMana ger.java:416) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.disablePlugins(CraftServer .java:395) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.stop(MinecraftServer.jav a:385) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java :500) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6 28) [minecraft_server.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
-
View User Profile
-
Send Message
Posted Mar 2, 2015@gpotter2
you mean a life?
-
View User Profile
-
Send Message
Posted Feb 27, 2015A nifty plugin this one is. Great work confuserr! :-)
-
View User Profile
-
Send Message
Posted Feb 24, 2015@SirPsp
I am having the problem of the thing never teleporting. Might be a bug with spigot's PacketPlayOutEntityTeleportEvent
-
View User Profile
-
Send Message
Posted Feb 12, 2015@SirPsp
Just read before downloading....
-
View User Profile
-
Send Message
Posted Feb 9, 2015I can see the dragon, and I can hear it flapping its wings.. sometimes the dragon teleports around and I can see it, but most of the time it stays still and I lose the bar if I move away from it.
-
View User Profile
-
Send Message
Posted Feb 1, 2015@confuserr I receive this error: http://prntscr.com/5zwwiv
-
View User Profile
-
Send Message
Posted Feb 1, 2015@xtomyserrax
This just means that the plugin "bossmessage" is trying to use BarAPI, wich one is having some errors...
-
View User Profile
-
Send Message
Posted Jan 31, 2015Do you know what this warn means??: They spam me all the console!
31.01 20:27:06 [Server] WARN at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) 31.01 20:27:06 [Server] WARN at net.pixelizedmc.bossmessage.utils.Messager$2$1.run(Messager.java:109) 31.01 20:27:06 [Server] WARN at net.pixelizedmc.bossmessage.utils.Messager.startProcess(Messager.java:97) 31.01 20:27:06 [Server] WARN at net.pixelizedmc.bossmessage.utils.Lib.setMsg(Lib.java:272) 31.01 20:27:06 [Server] WARN at net.pixelizedmc.bossmessage.utils.Lib.setPlayerMsg(Lib.java:149) 31.01 20:27:06 [Server] WARN at me.confuser.barapi.BarAPI.setMessage(BarAPI.java:259) 31.01 20:27:06 [Server] WARN at me.confuser.barapi.BarAPI.sendDragon(BarAPI.java:439) 31.01 20:27:06 [Server] WARN at me.confuser.barapi.nms.v1_7.getTeleportPacket(v1_7.java:139) 31.01 20:27:06 [Server] WARN at java.lang.Class.getConstructor(Unknown Source) 31.01 20:27:06 [Server] WARN at java.lang.Class.getConstructor0(Unknown Source) 31.01 20:27:06 [Server] WARN java.lang.NoSuchMethodException: net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport.<init>(int, int, int, int, byte, byte) 31.01 20:27:06 [Server] WARN at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) 31.01 20:27:06 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) 31.01 20:27:06 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) 31.01 20:27:06 [Server] WARN at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) 31.01 20:27:06 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) 31.01 20:27:06 [Server] WARN at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350)
-
View User Profile
-
Send Message
Posted Jan 31, 2015"Scroll messages if string is greater than 64 characters."
Sounds awesome, how does it go with this? :)
-
View User Profile
-
Send Message
Posted Jan 26, 2015@confuser
Sorry :)