public class BossBarBuilder
extends java.lang.Object
The recommended way
| Constructor and Description |
|---|
BossBarBuilder(boolean tracked)
The api for building bossbars.
|
| Modifier and Type | Method and Description |
|---|---|
UBossBar |
build()
Build the bar (aka, create it).
|
UBossBar |
buildDead()
Create a permanent bar.
|
boolean |
getPublicBar() |
boolean |
hasPlayers()
If there are any players associated witht he bar.
|
boolean |
isOnePlayer()
If there is only one player associated with the bar.
|
BossBarBuilder |
setColor(org.bukkit.boss.BarColor color)
Set the color of the boss bar.
|
void |
setData(java.lang.String key,
java.lang.String value)
Store data on the boss bar.
|
BossBarBuilder |
setId(int id)
Set the id of the bar.
|
BossBarBuilder |
setMessage(java.lang.String s)
Set the message of the boss bar.
|
BossBarBuilder |
setPlayerCollection(java.util.Collection<org.bukkit.entity.Player> players)
Set a collection of players.
|
BossBarBuilder |
setProgress(double progress)
Set the progress of the bossbar.
|
BossBarBuilder |
setPublicBar(boolean bool) |
BossBarBuilder |
setSinglePlayer(org.bukkit.entity.Player p)
Set a single player to a bar.
|
BossBarBuilder |
setStyle(org.bukkit.boss.BarStyle style)
Set the style of the boss bar.
|
BossBarBuilder |
setTime(int time)
Set the time of the bossbar.
|
BossBarBuilder |
setTracked(boolean value) |
BossBarBuilder |
setWorld(org.bukkit.World w)
Set the world a player/players need to be in.
|
public BossBarBuilder(boolean tracked)
tracked - If the UBossBar class should be stored in the active bars list once built.public BossBarBuilder setMessage(java.lang.String s)
s - public BossBarBuilder setColor(org.bukkit.boss.BarColor color)
color - public BossBarBuilder setStyle(org.bukkit.boss.BarStyle style)
style - public BossBarBuilder setTime(int time)
time - public BossBarBuilder setProgress(double progress)
progress - public BossBarBuilder setSinglePlayer(org.bukkit.entity.Player p)
p - The playerpublic BossBarBuilder setPlayerCollection(java.util.Collection<org.bukkit.entity.Player> players)
players - The collection of players.public BossBarBuilder setWorld(org.bukkit.World w)
w - public BossBarBuilder setId(int id)
id - The int id.public BossBarBuilder setTracked(boolean value)
public boolean isOnePlayer()
public boolean getPublicBar()
public BossBarBuilder setPublicBar(boolean bool)
public boolean hasPlayers()
public void setData(java.lang.String key,
java.lang.String value)
key - The key for the data.value - The data itself.public UBossBar build()
public UBossBar buildDead()