public interface ServerBossBar extends BossBar
Server
.Modifier and Type | Interface and Description |
---|---|
static interface |
ServerBossBar.Builder
Represents a builder class to create mutable
ServerBossBar s. |
Modifier and Type | Method and Description |
---|---|
ServerBossBar |
addPlayer(Player player)
Adds a player to this boss bar.
|
default ServerBossBar |
addPlayers(Collection<Player> players)
Adds a collection of players to this boss bar.
|
static ServerBossBar.Builder |
builder()
Creates a new
ServerBossBar.Builder to create ServerBossBar s. |
Collection<Player> |
getPlayers()
Gets a collection of all players on this boss bar.
|
boolean |
isVisible()
If this boss bar is visible.
|
ServerBossBar |
removePlayer(Player player)
Removes a player from this boss bar.
|
default ServerBossBar |
removePlayers(Collection<Player> players)
Removes a collection of players from this boss bar.
|
ServerBossBar |
setColor(BossBarColor color)
Sets the color.
|
ServerBossBar |
setCreateFog(boolean createFog)
Sets if fog should be created.
|
ServerBossBar |
setDarkenSky(boolean darkenSky)
Sets if the sky should darken.
|
ServerBossBar |
setName(Text name)
Sets the name of this boss bar.
|
ServerBossBar |
setOverlay(BossBarOverlay overlay)
Sets the overlay.
|
ServerBossBar |
setPercent(float percent)
Sets the percent.
|
ServerBossBar |
setPlayEndBossMusic(boolean playEndBossMusic)
Sets if the end boss music should be played.
|
ServerBossBar |
setVisible(boolean visible)
Sets if this boss bar is visible.
|
getColor, getName, getOverlay, getPercent, shouldCreateFog, shouldDarkenSky, shouldPlayEndBossMusic
getUniqueId
static ServerBossBar.Builder builder()
ServerBossBar.Builder
to create ServerBossBar
s.ServerBossBar setName(Text name)
BossBar
ServerBossBar setPercent(float percent)
BossBar
The percent must be between 0.0
and 1.0
.
setPercent
in interface BossBar
percent
- The percentServerBossBar setColor(BossBarColor color)
BossBar
ServerBossBar setOverlay(BossBarOverlay overlay)
BossBar
setOverlay
in interface BossBar
overlay
- The overlayServerBossBar setDarkenSky(boolean darkenSky)
BossBar
setDarkenSky
in interface BossBar
darkenSky
- If the sky should darkenServerBossBar setPlayEndBossMusic(boolean playEndBossMusic)
BossBar
setPlayEndBossMusic
in interface BossBar
playEndBossMusic
- If the end boss music should be playedServerBossBar setCreateFog(boolean createFog)
BossBar
setCreateFog
in interface BossBar
createFog
- If fog should be createdboolean isVisible()
ServerBossBar setVisible(boolean visible)
visible
- If this boss bar is visibleCollection<Player> getPlayers()
ServerBossBar addPlayer(Player player)
player
- The player to adddefault ServerBossBar addPlayers(Collection<Player> players)
players
- The players to addServerBossBar removePlayer(Player player)
player
- The player to removedefault ServerBossBar removePlayers(Collection<Player> players)
players
- The players to remove