Interface BossBar
- All Known Subinterfaces:
KeyedBossBar
public interface BossBar
-
Method Summary
Modifier 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
-
getTitle
-
setTitle
-
getColor
-
setColor
-
getStyle
-
setStyle
-
removeFlag
-
addFlag
-
hasFlag
-
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
-
removePlayer
-
removeAll
void removeAll()Removes all players from this boss bar- See Also:
-
getPlayers
-
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.Shows the previously hidden boss bar to all attached players -
hide
Deprecated.Hides this boss bar from all attached players
-
setVisible(boolean)