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

    Code is code, it is not pizza...

    MY PLUGINS

  • Avatar of confuserr confuserr Jan 26, 2015 at 11:53 UTC - 0 likes

    @gpotter2: Go

    I said I would pull and test it, I haven't had time to do that yet. Please be patient.

    @Icy_D_LuX: Go

    Caused by pvprun not BarAPI.

  • Avatar of gpotter2 gpotter2 Jan 24, 2015 at 16:21 UTC - 0 likes

    @confuserr: Go

    Huh... you said you were going to add my pull requests... ?

    Thanks !

    Last edited Jan 26, 2015 by gpotter2
  • Avatar of Xanusek Xanusek Jan 24, 2015 at 14:09 UTC - 0 likes

    @confuserr: Go

    Don't works for me, causing errors on listeners...it's everything ok with this version? Or im just stupid and can't build this well. May you give me exported .jar file on PM, please?

    Check HeroSouls!

    BFAK:90783512,fea18979d03b42f952e8bddcb2621470f9ec93d7391b57adc933cf166ee504f1

  • Avatar of Avery246813579 Avery246813579 Jan 23, 2015 at 22:38 UTC - 0 likes

    Found out Mineplex is using a very weird way to handle using the wither. Since you will always be able to see the particles in the distance even when the wither has more then 150 health!

    Please check out my social media pages

  • Avatar of Hmmcrunchy Hmmcrunchy Jan 22, 2015 at 13:21 UTC - 0 likes

    hiya just written my first plugin and linked it with yours :) http://dev.bukkit.org/bukkit-plugins/byte-thirst/

    Join us at www.byte.org.uk

  • Avatar of Icy_D_LuX Icy_D_LuX Jan 22, 2015 at 11:06 UTC - 0 likes

    org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) [JMC.jar:git-Spigot-e497721-a1ce164] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [JMC.jar:git-Spigot-e497721-a1ce164] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [JMC.jar:git-Spigot-e497721-a1ce164] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:255) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.PacketPlayInFlying.a(SourceFile:126) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.PacketPlayInPosition.a(SourceFile:57) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [JMC.jar:git-Spigot-e497721-a1ce164] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_25] at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:683) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:623) [JMC.jar:git-Spigot-e497721-a1ce164] at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:526) [JMC.jar:git-Spigot-e497721-a1ce164] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25] Caused by: java.lang.NullPointerException at fr.cabricraft.pvprun.economy.EconomyManager.<init>(EconomyManager.java:13) [?:?] at fr.cabricraft.pvprun.arenas.Arena.stopthegame(Arena.java:516) [?:?] at fr.cabricraft.pvprun.arenas.Arena.die(Arena.java:439) [?:?] at fr.cabricraft.pvprun.arenas.Arena.onPlayerDie(Arena.java:1105) [?:?] at sun.reflect.GeneratedMethodAccessor585.invoke(Unknown Source) [?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) [?:1.8.0_25] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) [JMC.jar:git-Spigot-e497721-a1ce164] ... 14 more [11:55:56] [Thread-65/ERROR]: Crash caused by BarAPI ! Please remove it or update it !

  • Avatar of Avery246813579 Avery246813579 Jan 20, 2015 at 05:52 UTC - 0 likes

    @confuserr: Go

    Well I am back from the dead xD It is awesome that you fixed the Invul. Did you find how you could control the health along with having no Invul. Also the smoke is added to in the e method in the EntityWither class.

    Line 147 in my decompiler:

          this.world.addParticle("smoke", d8 + this.random.nextGaussian() * 0.300000011920929D, d9 + this.random.nextGaussian() * 0.300000011920929D, d10 + this.random.nextGaussian() * 0.300000011920929D, 0.0D, 0.0D, 0.0D);--
    
    Update: If we were able to get the protected List u inside the net.minecraft.server.world, then we could remove the particle right after it is added.
    
    Last edited Jan 20, 2015 by Avery246813579
  • Avatar of policiu policiu Jan 19, 2015 at 14:46 UTC - 0 likes

    Will be fixed in 1.9(far-future). At least it is being fixed.

    Last edited Jan 19, 2015 by policiu

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
586,728
Recent files

Authors