Package org.bukkit.boss
Interface BossBar
-
public interface BossBar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addFlag(BarFlag flag)
Add an optional flag to this boss barvoid
addPlayer(Player player)
Adds the player to this boss bar causing it to display on their screen.BarColor
getColor()
Returns the color of this boss barList<Player>
getPlayers()
Returns all players viewing this boss bardouble
getProgress()
Returns the progress of the bar between 0.0 and 1.0BarStyle
getStyle()
Returns the style of this boss barString
getTitle()
Returns the title of this boss barboolean
hasFlag(BarFlag flag)
Returns whether this boss bar as the passed flag setvoid
hide()
Deprecated.boolean
isVisible()
Return if the boss bar is displayed to attached players.void
removeAll()
Removes all players from this boss barvoid
removeFlag(BarFlag flag)
Remove an existing flag on this boss barvoid
removePlayer(Player player)
Removes the player from this boss bar causing it to be removed from their screen.void
setColor(BarColor color)
Sets the color of this boss bar.void
setProgress(double progress)
Sets the progress of the bar.void
setStyle(BarStyle style)
Sets the bar style of this boss barvoid
setTitle(String title)
Sets the title of this boss barvoid
setVisible(boolean visible)
Set if the boss bar is displayed to attached players.void
show()
Deprecated.
-
-
-
Method Detail
-
getTitle
String getTitle()
Returns the title of this boss bar- Returns:
- the title of the bar
-
setTitle
void setTitle(String title)
Sets the title of this boss bar- Parameters:
title
- the title of the bar
-
getColor
BarColor getColor()
Returns the color of this boss bar- Returns:
- the color of the bar
-
setColor
void setColor(BarColor color)
Sets the color of this boss bar.- Parameters:
color
- the color of the bar
-
getStyle
BarStyle getStyle()
Returns the style of this boss bar- Returns:
- the style of the bar
-
setStyle
void setStyle(BarStyle style)
Sets the bar style of this boss bar- Parameters:
style
- the style of the bar
-
removeFlag
void removeFlag(BarFlag flag)
Remove an existing flag on this boss bar- Parameters:
flag
- the existing flag to remove
-
addFlag
void addFlag(BarFlag flag)
Add an optional flag to this boss bar- Parameters:
flag
- an optional flag to set on the boss bar
-
hasFlag
boolean hasFlag(BarFlag flag)
Returns whether this boss bar as the passed flag set- Parameters:
flag
- the flag to check- Returns:
- whether it has the flag
-
setProgress
void setProgress(double progress)
Sets the progress of the bar. Values should be between 0.0 (empty) and 1.0 (full)- Parameters:
progress
- the progress of the bar
-
getProgress
double getProgress()
Returns the progress of the bar between 0.0 and 1.0- Returns:
- the progress of the bar
-
addPlayer
void addPlayer(Player player)
Adds the player to this boss bar causing it to display on their screen.- Parameters:
player
- the player to add
-
removePlayer
void removePlayer(Player player)
Removes the player from this boss bar causing it to be removed from their screen.- Parameters:
player
- the player to remove
-
removeAll
void removeAll()
Removes all players from this boss bar- See Also:
removePlayer(Player)
-
getPlayers
List<Player> getPlayers()
Returns all players viewing this boss bar- Returns:
- a immutable list of players
-
setVisible
void setVisible(boolean visible)
Set if the boss bar is displayed to attached players.- Parameters:
visible
- visible status
-
isVisible
boolean isVisible()
Return if the boss bar is displayed to attached players.- Returns:
- visible status
-
show
@Deprecated void show()
Deprecated.Shows the previously hidden boss bar to all attached players
-
hide
@Deprecated void hide()
Deprecated.Hides this boss bar from all attached players
-
-