public class BukkitBossBar extends Object implements AbstractBossBar
AbstractBossBar.BarColor, AbstractBossBar.BarFlag, AbstractBossBar.BarStyle
Constructor and Description |
---|
BukkitBossBar(String title,
AbstractBossBar.BarColor aColor,
AbstractBossBar.BarStyle aStyle) |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(String flag)
Add an optional flag to this boss bar
|
void |
addPlayer(AbstractPlayer player)
Adds the player to this boss bar causing it to display on their screen.
|
void |
close() |
AbstractBossBar.BarColor |
getColor()
Returns the color of this boss bar
|
List<AbstractPlayer> |
getPlayers()
Returns all players viewing this boss bar
|
double |
getProgress()
Returns the progress of the bar between 0.0 and 1.0
|
AbstractBossBar.BarStyle |
getStyle()
Returns the style of this boss bar
|
String |
getTitle()
Returns the title of this boss bar
|
boolean |
hasFlag(String flag)
Returns whether this boss bar as the passed flag set
|
boolean |
isVisible()
Return if the boss bar is displayed to attached players.
|
void |
removeAll()
Removes all players from this boss bar
|
void |
removeFlag(String flag)
Remove an existing flag on this boss bar
|
void |
removePlayer(AbstractPlayer player)
Removes the player from this boss bar causing it to be removed from their
screen.
|
void |
setColor(String color)
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 |
setStyle(String style)
Sets the bar style of this boss bar
|
void |
setTitle(String title)
Sets the title of this boss bar
|
void |
setVisible(boolean visible)
Set if the boss bar is displayed to attached players.
|
public BukkitBossBar(String title, AbstractBossBar.BarColor aColor, AbstractBossBar.BarStyle aStyle)
public String getTitle()
AbstractBossBar
getTitle
in interface AbstractBossBar
public void setTitle(String title)
AbstractBossBar
setTitle
in interface AbstractBossBar
title
- the title of the barpublic AbstractBossBar.BarColor getColor()
AbstractBossBar
getColor
in interface AbstractBossBar
public void setColor(String color)
AbstractBossBar
setColor
in interface AbstractBossBar
color
- the color of the barpublic AbstractBossBar.BarStyle getStyle()
AbstractBossBar
getStyle
in interface AbstractBossBar
public void setStyle(String style)
AbstractBossBar
setStyle
in interface AbstractBossBar
style
- the style of the barpublic void removeFlag(String flag)
AbstractBossBar
removeFlag
in interface AbstractBossBar
flag
- the existing flag to removepublic void addFlag(String flag)
AbstractBossBar
addFlag
in interface AbstractBossBar
flag
- an optional flag to set on the boss barpublic boolean hasFlag(String flag)
AbstractBossBar
hasFlag
in interface AbstractBossBar
flag
- the flag to checkpublic void setProgress(double progress)
AbstractBossBar
setProgress
in interface AbstractBossBar
progress
- the progress of the barpublic double getProgress()
AbstractBossBar
getProgress
in interface AbstractBossBar
public void addPlayer(AbstractPlayer player)
AbstractBossBar
addPlayer
in interface AbstractBossBar
player
- the player to addpublic void removePlayer(AbstractPlayer player)
AbstractBossBar
removePlayer
in interface AbstractBossBar
player
- the player to removepublic void removeAll()
AbstractBossBar
removeAll
in interface AbstractBossBar
AbstractBossBar.removeAll()
public List<AbstractPlayer> getPlayers()
AbstractBossBar
getPlayers
in interface AbstractBossBar
public void setVisible(boolean visible)
AbstractBossBar
setVisible
in interface AbstractBossBar
visible
- visible statuspublic boolean isVisible()
AbstractBossBar
isVisible
in interface AbstractBossBar
public void setCreateFog(boolean b)
setCreateFog
in interface AbstractBossBar
public void setDarkenSky(boolean b)
setDarkenSky
in interface AbstractBossBar
public void setPlayBossMusic(boolean b)
setPlayBossMusic
in interface AbstractBossBar
public void close()
close
in interface io.lumine.utils.terminable.Terminable
close
in interface AutoCloseable
Copyright © 2020. All rights reserved.