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
ConstructorDescriptionAdventureBossBar
(String title, float progress, AbstractBossBar.BarColor color, AbstractBossBar.BarStyle style) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an optional flag to this boss barvoid
addPlayer
(AbstractPlayer player) Adds the player to this boss bar causing it to display on their screen.void
close()
getColor()
Returns the color of this boss barReturns all players viewing this boss bardouble
Returns the progress of the bar between 0.0 and 1.0getStyle()
Returns the style of this boss bargetTitle()
Returns the title of this boss barboolean
Returns whether this boss bar as the passed flag setboolean
isViewing
(AbstractPlayer player) boolean
Return if the boss bar is displayed to attached players.void
Removes all players from this boss barvoid
removeFlag
(String flag) Remove an existing flag on this boss barvoid
removePlayer
(AbstractPlayer player) Removes the player from this boss bar causing it to be removed from their screen.void
removePlayer
(UUID player) void
Sets the color of this boss bar.void
setCreateFog
(boolean b) void
setDarkenSky
(boolean b) void
setPlayBossMusic
(boolean b) void
setProgress
(double progress) Sets the progress of the bar.void
Sets the bar style of this boss barvoid
Sets the title of this boss barvoid
setVisible
(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, wait
Methods 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:AbstractBossBar
Returns the title of this boss bar- Specified by:
getTitle
in interfaceAbstractBossBar
- Returns:
- the title of the bar
-
setTitle
Description copied from interface:AbstractBossBar
Sets the title of this boss bar- Specified by:
setTitle
in interfaceAbstractBossBar
- Parameters:
title
- the title of the bar
-
getColor
Description copied from interface:AbstractBossBar
Returns the color of this boss bar- Specified by:
getColor
in interfaceAbstractBossBar
- Returns:
- the color of the bar
-
setColor
Description copied from interface:AbstractBossBar
Sets the color of this boss bar.- Specified by:
setColor
in interfaceAbstractBossBar
- Parameters:
color
- the color of the bar
-
getStyle
Description copied from interface:AbstractBossBar
Returns the style of this boss bar- Specified by:
getStyle
in interfaceAbstractBossBar
- Returns:
- the style of the bar
-
setStyle
Description copied from interface:AbstractBossBar
Sets the bar style of this boss bar- Specified by:
setStyle
in interfaceAbstractBossBar
- Parameters:
style
- the style of the bar
-
removeFlag
Description copied from interface:AbstractBossBar
Remove an existing flag on this boss bar- Specified by:
removeFlag
in interfaceAbstractBossBar
- Parameters:
flag
- the existing flag to remove
-
addFlag
Description copied from interface:AbstractBossBar
Add an optional flag to this boss bar- Specified by:
addFlag
in interfaceAbstractBossBar
- Parameters:
flag
- an optional flag to set on the boss bar
-
hasFlag
Description copied from interface:AbstractBossBar
Returns whether this boss bar as the passed flag set- Specified by:
hasFlag
in interfaceAbstractBossBar
- Parameters:
flag
- the flag to check- Returns:
- whether it has the flag
-
setProgress
public void setProgress(double progress) Description copied from interface:AbstractBossBar
Sets the progress of the bar. Values should be between 0.0 (empty) and 1.0 (full)- Specified by:
setProgress
in interfaceAbstractBossBar
- Parameters:
progress
- the progress of the bar
-
getProgress
public double getProgress()Description copied from interface:AbstractBossBar
Returns the progress of the bar between 0.0 and 1.0- Specified by:
getProgress
in interfaceAbstractBossBar
- Returns:
- the progress of the bar
-
addPlayer
Description copied from interface:AbstractBossBar
Adds the player to this boss bar causing it to display on their screen.- Specified by:
addPlayer
in interfaceAbstractBossBar
- Parameters:
player
- the player to add
-
removePlayer
Description copied from interface:AbstractBossBar
Removes the player from this boss bar causing it to be removed from their screen.- Specified by:
removePlayer
in interfaceAbstractBossBar
- Parameters:
player
- the player to remove
-
removeAll
public void removeAll()Description copied from interface:AbstractBossBar
Removes all players from this boss bar- Specified by:
removeAll
in interfaceAbstractBossBar
- See Also:
-
getPlayers
Description copied from interface:AbstractBossBar
Returns all players viewing this boss bar- Specified by:
getPlayers
in interfaceAbstractBossBar
- Returns:
- a immutable list of players
-
setVisible
public void setVisible(boolean visible) Description copied from interface:AbstractBossBar
Set if the boss bar is displayed to attached players.- Specified by:
setVisible
in interfaceAbstractBossBar
- Parameters:
visible
- visible status
-
isVisible
public boolean isVisible()Description copied from interface:AbstractBossBar
Return if the boss bar is displayed to attached players.- Specified by:
isVisible
in interfaceAbstractBossBar
- Returns:
- visible status
-
setCreateFog
public void setCreateFog(boolean b) - Specified by:
setCreateFog
in interfaceAbstractBossBar
-
setDarkenSky
public void setDarkenSky(boolean b) - Specified by:
setDarkenSky
in interfaceAbstractBossBar
-
setPlayBossMusic
public void setPlayBossMusic(boolean b) - Specified by:
setPlayBossMusic
in interfaceAbstractBossBar
-
getPlayerIds
- Specified by:
getPlayerIds
in interfaceAbstractBossBar
-
removePlayer
- Specified by:
removePlayer
in interfaceAbstractBossBar
-
isViewing
- Specified by:
isViewing
in interfaceAbstractBossBar
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceio.lumine.utils.terminable.Terminable
-