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

German - DerFeliix

Source

GitHub

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.

Frostcast CI

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

WelcomeBar

Parkour

QuickSupport

BossBroadcast

BossMessage

PvPGames Automated

BossEventScheduler

Infernal Mobs

MythicMobs

MultiKill

PlayerBoss

BossAds

Item Lore Stats

BossBarPro

VIPLobby

Battle Of Blocks

BossBroadcaster

SilkSpawners

BarJoin

JoinGlobalMessages

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.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of stefvanschie stefvanschie May 24, 2016 at 14:09 UTC - 0 likes

    Do you have an option to donate for this plugin?

    Don't ask me to work for your server! I already work for one.

    My plugins:
    Teleporter | Building Game

  • Avatar of Rocologo Rocologo May 07, 2016 at 23:03 UTC - 0 likes

    MobHunting does now use BarAPI. I use your API to show the players "MobHunting learning messages", instead of spamming the chat.

    Thank you for a great API - easy to use and implement!

    My newest plugin: MobHunting

    Donation

  • Avatar of confuser confuser Mar 03, 2016 at 11:54 UTC - 1 like

    @frizzbee30: Go

    Yes, this plugin is NMS based. It does break between versions. As 1.9 adds a new Bukkit API for boss bars, the next update for this plugin adding 1.9 support will be it's last. It will be primarily to support backwards compatibility and give time for devs to move over to the new Bukkit API methods in 1.9.

  • Avatar of frizzbee30 frizzbee30 Mar 01, 2016 at 15:07 UTC - 0 likes

    I think there's an issue with 1.9 , saw load log complaining :)

    KB Craft multiworld server
    Website http://kbcraftgaming.enjin.com/home
    Members blog site and file share
    http://kbcraftgaming.com
    Server 192.95.40.76 New players are always given a warm welcome!

  • Avatar of Redstone_Pro_73 Redstone_Pro_73 Feb 07, 2016 at 19:16 UTC - 0 likes

    It seems to work ok, but it sometimes glitches into your face for a couple ms and when a player turns quickly, it takes a second for the dragon to be moved. And this is not lag since I am running it on my VPS (Specs: 6GB of RAM given to this single minecraft server with nothing else on besides the BarAPI and my simple plugin just to add the bar, and Xeon v3 1231)

    Banner70 ZBDHc9aa1bdf7398ef79cd2f02a81c455dc0

  • Avatar of AaronMcH AaronMcH Feb 03, 2016 at 12:39 UTC - 0 likes

    @games647: Go

    Seems to be fixed now

  • Avatar of games647 games647 Jan 31, 2016 at 12:21 UTC - 0 likes

    @AaronMcH: Go

    It fails for me too, because the jar isn't available in the repo. :(

    FastLogin Auto login cracked accounts if the player has a paid account
    ScoreboardStats Fast custom scoreboard + compatibility with other scoreboard plugins
    ChangeSkin Change your ingame skin
    LagMonitor Analyze your server performance
    Minecraft Database

  • Avatar of PieBob851 PieBob851 Jan 28, 2016 at 02:55 UTC - 0 likes

    Ummmm... When I used this it spawn =ed an ender dragon that cant be killed. Is this a glitch? The ender dragon is not damaging anything, so I woudnt be annoyed if people could still see the bossbar. Unfortunately, the dragon is so far away that noone is able to see the bar D=. PLS help

  • Avatar of AaronMcH AaronMcH Jan 25, 2016 at 22:46 UTC - 0 likes

    Is it just me or do others get errors with the Maven repository? I realised that the version should be 3.4-SNAPSHOT, but that doesn't seem to help, error seems to be to do with net.gravitydevelopment.updater.

    Any help would be great Thanks

  • Avatar of justinwl justinwl Jan 24, 2016 at 08:13 UTC - 0 likes

    @jflory7: Go

    It would be nice if i could choose the height or where the enderdragon is, because i have a skyblock server and the stuff is well.. in the sky and the enderdragon is in the middle of all of it... Thanks.

Facts

Date created
Sep 01, 2013
Category
Last update
Mar 19, 2016
Development stage
Release
License
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Curse link
BarAPI
Reverse relationships
14
Downloads
1,283,181
Recent files

Authors