Package org.bukkit.boss
Interface BossBar
- All Known Subinterfaces:
- KeyedBossBar
public interface BossBar
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd an optional flag to this boss barvoidAdds the player to this boss bar causing it to display on their screen.getColor()Returns the color of this boss barReturns all players viewing this boss bardoubleReturns the progress of the bar between 0.0 and 1.0getStyle()Returns the style of this boss bargetTitle()Returns the title of this boss barbooleanReturns whether this boss bar as the passed flag setvoidhide()Deprecated.booleanReturn if the boss bar is displayed to attached players.voidRemoves all players from this boss barvoidremoveFlag(@NotNull BarFlag flag) Remove an existing flag on this boss barvoidremovePlayer(@NotNull Player player) Removes the player from this boss bar causing it to be removed from their screen.voidSets the color of this boss bar.voidsetProgress(double progress) Sets the progress of the bar.voidSets the bar style of this boss barvoidSets the title of this boss barvoidsetVisible(boolean visible) Set if the boss bar is displayed to attached players.voidshow()Deprecated.
- 
Method Details- 
getTitleReturns the title of this boss bar- Returns:
- the title of the bar
 
- 
setTitleSets the title of this boss bar- Parameters:
- title- the title of the bar
 
- 
getColorReturns the color of this boss bar- Returns:
- the color of the bar
 
- 
setColorSets the color of this boss bar.- Parameters:
- color- the color of the bar
 
- 
getStyleReturns the style of this boss bar- Returns:
- the style of the bar
 
- 
setStyleSets the bar style of this boss bar- Parameters:
- style- the style of the bar
 
- 
removeFlagRemove an existing flag on this boss bar- Parameters:
- flag- the existing flag to remove
 
- 
addFlagAdd an optional flag to this boss bar- Parameters:
- flag- an optional flag to set on the boss bar
 
- 
hasFlagReturns whether this boss bar as the passed flag set- Parameters:
- flag- the flag to check
- Returns:
- whether it has the flag
 
- 
setProgressvoid 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
 
- 
getProgressdouble getProgress()Returns the progress of the bar between 0.0 and 1.0- Returns:
- the progress of the bar
 
- 
addPlayerAdds the player to this boss bar causing it to display on their screen.- Parameters:
- player- the player to add
 
- 
removePlayerRemoves the player from this boss bar causing it to be removed from their screen.- Parameters:
- player- the player to remove
 
- 
removeAllvoid removeAll()Removes all players from this boss bar- See Also:
 
- 
getPlayersReturns all players viewing this boss bar- Returns:
- a immutable list of players
 
- 
setVisiblevoid setVisible(boolean visible) Set if the boss bar is displayed to attached players.- Parameters:
- visible- visible status
 
- 
isVisibleboolean isVisible()Return if the boss bar is displayed to attached players.- Returns:
- visible status
 
- 
showDeprecated.Shows the previously hidden boss bar to all attached players
- 
hideDeprecated.Hides this boss bar from all attached players
 
- 
setVisible(boolean)