public interface BossBar extends Terminable
EMPTY| Modifier and Type | Method and Description |
|---|---|
void |
addPlayer(Player player)
Adds the player to this boss bar causing it to display on their screen.
|
default void |
addPlayers(Iterable<Player> players)
Adds the players to this boss bar causing it to display on their screens.
|
void |
close()
Closes this resource.
|
BossBarColor |
color()
Gets the color of this boss bar
|
BossBar |
color(BossBarColor color)
Sets the color of this boss bar.
|
List<Player> |
players()
Returns all players viewing this boss bar
|
double |
progress()
Gets the progress of the bar between 0.0 and 1.0
|
BossBar |
progress(double progress)
Sets the progress of the bar.
|
void |
removeAll()
Removes all players from this boss bar
|
void |
removePlayer(Player player)
Removes the player from this boss bar causing it to be removed from their
screen.
|
default void |
removePlayers(Iterable<Player> players)
Removes the players from this boss bar causing it to be removed from their
screens.
|
BossBarStyle |
style()
Gets the style of this boss bar
|
BossBar |
style(BossBarStyle style)
Sets the bar style of this boss bar
|
String |
title()
Gets the title of this boss bar
|
BossBar |
title(String title)
Sets the title of this boss bar
|
boolean |
visible()
Gets if the boss bar is displayed to attached players.
|
BossBar |
visible(boolean visible)
Set if the boss bar is displayed to attached players.
|
bindWith, closeAndReportException, closeSilently, isClosed@Nonnull BossBar title(@Nonnull String title)
title - the title of the bardouble progress()
@Nonnull BossBar progress(double progress)
progress - the progress of the bar@Nonnull BossBarColor color()
@Nonnull BossBar color(@Nonnull BossBarColor color)
color - the color of the bar@Nonnull BossBarStyle style()
@Nonnull BossBar style(@Nonnull BossBarStyle style)
style - the style of the barboolean visible()
@Nonnull BossBar visible(boolean visible)
visible - visible status@Nonnull List<Player> players()
void addPlayer(@Nonnull Player player)
player - the player to addvoid removePlayer(@Nonnull Player player)
player - the player to removedefault void addPlayers(@Nonnull Iterable<Player> players)
players - the players to adddefault void removePlayers(@Nonnull Iterable<Player> players)
players - the players to removevoid removeAll()
void close()
Terminableclose in interface AutoCloseableclose in interface TerminableCopyright © 2020. All rights reserved.