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 Cmoor Cmoor Mar 02, 2015 at 08:23 UTC - 0 likes

    @gpotter2: Go

    you mean a life?

  • Avatar of AstralRevenant AstralRevenant Feb 27, 2015 at 17:38 UTC - 0 likes

    A nifty plugin this one is. Great work confuserr! :-)

    Astral-craft

    Hosting a survival multiplayer minecraft server. The server address is "167.114.116.136:25601", (between the quotes). The client is spigot 1.8(latest). :-)

  • Avatar of ferrago ferrago Feb 24, 2015 at 15:12 UTC - 0 likes

    @SirPsp: Go

    I am having the problem of the thing never teleporting. Might be a bug with spigot's PacketPlayOutEntityTeleportEvent

    CQR|CQR BFAK:90678341,d162341bd70f9d48ee9bedc969773e3b0744d0a6da70e240520c96318ec8557b

  • Avatar of gpotter2 gpotter2 Feb 12, 2015 at 18:14 UTC - 0 likes

    @SirPsp: Go

    Known caveats
    
    * Due to a client side bug with 1.8, the bar is only visible to a player if they are looking at the enderdragon. This means players will be able to see an enderdragon in the distance.
    

    Just read before downloading....

    Last edited Feb 12, 2015 by gpotter2

    Code is code, it is not pizza...

    MY PLUGINS

  • Avatar of SirPsp SirPsp Feb 10, 2015 at 01:00 UTC - 0 likes

    I 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.

  • Avatar of DadAztec DadAztec Feb 01, 2015 at 21:28 UTC - 0 likes

    @confuserr I receive this error: http://prntscr.com/5zwwiv

  • Avatar of gpotter2 gpotter2 Feb 01, 2015 at 14:20 UTC - 0 likes

    @xtomyserrax: Go

    This just means that the plugin "bossmessage" is trying to use BarAPI, wich one is having some errors...

  • Avatar of xtomyserrax xtomyserrax Jan 31, 2015 at 20:28 UTC - 0 likes

    Do 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)

    If you have any plugin idea, just PM me. Si tienes una idea de plugin solamente enviame un mensaje privado.

    Are you looking for a good Minecraft Server Host? With the best DDoS protection? Click here and have a look!

  • Avatar of Marium0505 Marium0505 Jan 31, 2015 at 15:42 UTC - 0 likes

    "Scroll messages if string is greater than 64 characters."

    Sounds awesome, how does it go with this? :)

  • Avatar of gpotter2 gpotter2 Jan 26, 2015 at 12:05 UTC - 0 likes

    @confuserr: Go

    Sorry :)

Facts

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

Authors