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>

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

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 Desle Desle Jul 27, 2014 at 19:02 UTC - 0 likes

    @Lionhard98: Go

    Add a check if the percentage you set the boss bar to, is (lower than) 0. If so, set it to 1. =)

  • Avatar of The3ShotGod The3ShotGod Jul 17, 2014 at 22:02 UTC - 0 likes

    @Condolent: Go

    No its just like when you use craftbukkit on your build path. It is just there so the program you use knows what you are talking about, which is why you needed to add it to the server.

    BFAK:90956893,f4eaab1e6ee85ae82cbe7ce1f192a6e911c92981d8b0cb69e9472ccc16f69387

  • Avatar of Condolent Condolent Jul 15, 2014 at 13:58 UTC - 0 likes

    It only works if the .jar file is in my plugins folder on the server. Shouldn't it just be needed to add it to my buildpath?

    Last edited Jul 15, 2014 by Condolent
  • Avatar of TheShadowUniverse TheShadowUniverse Jul 10, 2014 at 01:46 UTC - 0 likes

    Could you add my plugin to your list of plugins using the API, http://dev.bukkit.org/bukkit-plugins/draw-my-thing

    Thanks ;)

  • Avatar of confuserr confuserr Jul 02, 2014 at 08:33 UTC - 0 likes

    @kup18: Go

    It's not compatible with 1.5.2, only 1.6.4+.

  • Avatar of kup18 kup18 Jul 01, 2014 at 21:59 UTC - 0 likes

    whne i write bm and messige it crushes and my mc server version is 1.5.2 help me plz

  • Avatar of kup18 kup18 Jul 01, 2014 at 21:05 UTC - 0 likes

    which version of this plugin do i need for 1.5.2 mc server?

  • Avatar of XA_Lany XA_Lany Jun 30, 2014 at 10:29 UTC - 0 likes

    Small Question:

    Can you use the API from an Async Thread? That would speed up things pretty much ;)

  • Avatar of mrcreep04 mrcreep04 Jun 29, 2014 at 10:38 UTC - 0 likes

    Is there anybody else that have a lot of client lags ?

  • Avatar of Bammerbom Bammerbom Jun 25, 2014 at 11:47 UTC - 0 likes

    @Xikage: Go

    Same problem. But for me it doesnt decrease and just dissapears when the time is finished.

    dev.bukkit.org/bukkit-plugins/ultimate_core

Facts

Date created
Sep 01, 2013
Category
Last update
Apr 19, 2014
Development stage
Release
License
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Curse link
BarAPI
Downloads
275,833
Recent files

Authors