BarAPI Plugin 1.7.2

Updated: May 28, 2015 | 301 views |

BarAPI

http://img.niceminecraft.net/BukkitPlugin/BarAPI.png

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.

Source

GitHub

To Dos

  • Add an optional auto updater.
  • Scroll messages if string is greater than 64 characters.

Plugins Using BarAPI

WelcomeBar

Parkour

BarAPI Plugin 1.7.2 Download Links

http://www.dl2.9minecraft.net/index.php?act=dl&id=1386648328

http://www.dl5.9minecraft.net/index.php?act=dl&id=1386673813


Credits: confuserr