public interface BossBar
| Modifier and Type | Method and Description |
|---|---|
void |
addFlags(BossBarFlag... flags)
Adds new flags to the boss bar.
|
void |
addPlayer(Player player)
Adds player to this boss bar.
|
void |
addPlayers(Iterable<Player> players)
Adds all specified players to this boss bar.
|
BossBarColor |
getColor()
Gets the color of the boss bar.
|
Collection<BossBarFlag> |
getFlags()
Returns a copy of of the
Collection of all BossBarFlags added to the boss bar. |
BossBarOverlay |
getOverlay()
Gets the overlay of the boss bar.
|
float |
getPercent()
Gets the boss bar's percent.
|
Collection<Player> |
getPlayers()
Returns a copy of the
Collection of all Player added to the boss bar. |
Component |
getTitle()
Gets the title of this boss bar.
|
boolean |
isVisible()
Returns whenever this boss bar is visible to all added
getPlayers(). |
void |
removeAllPlayers()
Removes all players, that see this boss bar.
|
void |
removeFlag(BossBarFlag flag)
Removes flag from the boss bar.
|
void |
removeFlags(BossBarFlag... flags)
Removes flags from the boss bar.
|
void |
removePlayer(Player player)
Removes player from this boss bar.
|
void |
removePlayers(Iterable<Player> players)
Removes all specified players from this boss bar.
|
void |
setColor(BossBarColor color)
Sets a new color of the boss bar.
|
void |
setOverlay(BossBarOverlay overlay)
Sets a new overlay of the boss bar.
|
void |
setPercent(float percent)
Sets a new percent of the boss bar.
|
void |
setTitle(Component title)
Sets a new title of the boss bar.
|
void |
setVisible(boolean visible)
Sets a new visibility to the boss bar.
|
void addPlayers(Iterable<Player> players)
players - playersaddPlayer(Player)void addPlayer(Player player)
getPlayers() and makes him
see the boss bar.player - the player you wish to addvoid removePlayer(Player player)
getPlayers() and makes
him not see the boss bar.player - the player you wish to removevoid removePlayers(Iterable<Player> players)
players - playersremovePlayer(Player)void removeAllPlayers()
removePlayer(Player)Component getTitle()
void setTitle(Component title)
title - new titlefloat getPercent()
void setPercent(float percent)
percent - a float between 0 and 1, representing boss bar's percentIllegalArgumentException - if the new percent is not between 0 and 1Collection<Player> getPlayers()
Collection of all Player added to the boss bar.
Can be empty.BossBarColor getColor()
void setColor(BossBarColor color)
color - the color you wish the boss bar be displayed withBossBarOverlay getOverlay()
void setOverlay(BossBarOverlay overlay)
overlay - the overlay you wish the boss bar be displayed withboolean isVisible()
getPlayers(). By default, it
returns true.true if visible, otherwise falsevoid setVisible(boolean visible)
visible - boss bar visibility valueCollection<BossBarFlag> getFlags()
Collection of all BossBarFlags added to the boss bar.void addFlags(BossBarFlag... flags)
flags - the flags you wish to addvoid removeFlag(BossBarFlag flag)
flag - the flag you wish to removevoid removeFlags(BossBarFlag... flags)
flags - the flags you wish to remove