Class AdventureBossBar
java.lang.Object
io.lumine.mythic.bukkit.adapters.bossbars.AdventureBossBar
- All Implemented Interfaces:
AbstractBossBar,io.lumine.utils.terminable.Terminable,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.lumine.mythic.api.adapters.AbstractBossBar
AbstractBossBar.BarColor, AbstractBossBar.BarFlag, AbstractBossBar.BarStyle -
Field Summary
Fields inherited from interface io.lumine.utils.terminable.Terminable
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionAdventureBossBar(String title, float progress, AbstractBossBar.BarColor color, AbstractBossBar.BarStyle style) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an optional flag to this boss barvoidaddPlayer(AbstractPlayer player) Adds the player to this boss bar causing it to display on their screen.voidclose()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 setbooleanisViewing(AbstractPlayer player) booleanReturn if the boss bar is displayed to attached players.voidRemoves all players from this boss barvoidremoveFlag(String flag) Remove an existing flag on this boss barvoidremovePlayer(AbstractPlayer player) Removes the player from this boss bar causing it to be removed from their screen.voidremovePlayer(UUID player) voidSets the color of this boss bar.voidsetCreateFog(boolean b) voidsetDarkenSky(boolean b) voidsetPlayBossMusic(boolean b) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.lumine.utils.terminable.Terminable
bindWith, closeAndReportException, closeSilently, hasTerminated, isClosed, terminate
-
Constructor Details
-
AdventureBossBar
public AdventureBossBar(String title, float progress, AbstractBossBar.BarColor color, AbstractBossBar.BarStyle style)
-
-
Method Details
-
getTitle
Description copied from interface:AbstractBossBarReturns the title of this boss bar- Specified by:
getTitlein interfaceAbstractBossBar- Returns:
- the title of the bar
-
setTitle
Description copied from interface:AbstractBossBarSets the title of this boss bar- Specified by:
setTitlein interfaceAbstractBossBar- Parameters:
title- the title of the bar
-
getColor
Description copied from interface:AbstractBossBarReturns the color of this boss bar- Specified by:
getColorin interfaceAbstractBossBar- Returns:
- the color of the bar
-
setColor
Description copied from interface:AbstractBossBarSets the color of this boss bar.- Specified by:
setColorin interfaceAbstractBossBar- Parameters:
color- the color of the bar
-
getStyle
Description copied from interface:AbstractBossBarReturns the style of this boss bar- Specified by:
getStylein interfaceAbstractBossBar- Returns:
- the style of the bar
-
setStyle
Description copied from interface:AbstractBossBarSets the bar style of this boss bar- Specified by:
setStylein interfaceAbstractBossBar- Parameters:
style- the style of the bar
-
removeFlag
Description copied from interface:AbstractBossBarRemove an existing flag on this boss bar- Specified by:
removeFlagin interfaceAbstractBossBar- Parameters:
flag- the existing flag to remove
-
addFlag
Description copied from interface:AbstractBossBarAdd an optional flag to this boss bar- Specified by:
addFlagin interfaceAbstractBossBar- Parameters:
flag- an optional flag to set on the boss bar
-
hasFlag
Description copied from interface:AbstractBossBarReturns whether this boss bar as the passed flag set- Specified by:
hasFlagin interfaceAbstractBossBar- Parameters:
flag- the flag to check- Returns:
- whether it has the flag
-
setProgress
public void setProgress(double progress) Description copied from interface:AbstractBossBarSets the progress of the bar. Values should be between 0.0 (empty) and 1.0 (full)- Specified by:
setProgressin interfaceAbstractBossBar- Parameters:
progress- the progress of the bar
-
getProgress
public double getProgress()Description copied from interface:AbstractBossBarReturns the progress of the bar between 0.0 and 1.0- Specified by:
getProgressin interfaceAbstractBossBar- Returns:
- the progress of the bar
-
addPlayer
Description copied from interface:AbstractBossBarAdds the player to this boss bar causing it to display on their screen.- Specified by:
addPlayerin interfaceAbstractBossBar- Parameters:
player- the player to add
-
removePlayer
Description copied from interface:AbstractBossBarRemoves the player from this boss bar causing it to be removed from their screen.- Specified by:
removePlayerin interfaceAbstractBossBar- Parameters:
player- the player to remove
-
removeAll
public void removeAll()Description copied from interface:AbstractBossBarRemoves all players from this boss bar- Specified by:
removeAllin interfaceAbstractBossBar- See Also:
-
getPlayers
Description copied from interface:AbstractBossBarReturns all players viewing this boss bar- Specified by:
getPlayersin interfaceAbstractBossBar- Returns:
- a immutable list of players
-
setVisible
public void setVisible(boolean visible) Description copied from interface:AbstractBossBarSet if the boss bar is displayed to attached players.- Specified by:
setVisiblein interfaceAbstractBossBar- Parameters:
visible- visible status
-
isVisible
public boolean isVisible()Description copied from interface:AbstractBossBarReturn if the boss bar is displayed to attached players.- Specified by:
isVisiblein interfaceAbstractBossBar- Returns:
- visible status
-
setCreateFog
public void setCreateFog(boolean b) - Specified by:
setCreateFogin interfaceAbstractBossBar
-
setDarkenSky
public void setDarkenSky(boolean b) - Specified by:
setDarkenSkyin interfaceAbstractBossBar
-
setPlayBossMusic
public void setPlayBossMusic(boolean b) - Specified by:
setPlayBossMusicin interfaceAbstractBossBar
-
getPlayerIds
- Specified by:
getPlayerIdsin interfaceAbstractBossBar
-
removePlayer
- Specified by:
removePlayerin interfaceAbstractBossBar
-
isViewing
- Specified by:
isViewingin interfaceAbstractBossBar
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceio.lumine.utils.terminable.Terminable
-