Interface BossBar
public interface BossBar
-
Method Summary
Modifier and TypeMethodDescriptionaddConnection
(UserConnection conn) Show the bossbar to a player connection.Add flagsShow the bossbar to a player (uuid).getColor()
Get the bossbar colorGet UserConnections.float
Get the healthgetId()
Get the UUID of this bossbarGet players.getStyle()
Get the bosbar stylegetTitle()
Get the current titleboolean
hide()
Hide the bossbar from everyone (In the getPlayer set)boolean
Is it visible?Removes the bossbar from a player connection.removeFlag
(BossFlag flag) Remove flags.removePlayer
(UUID uuid) Removes the bossbar from a player.Yay, colors!setHealth
(float health) Change the healthChange the bosbar styleChange the titleshow()
Show the bossbar to everyone (In the getPlayer set)
-
Method Details
-
getTitle
String getTitle()Get the current title- Returns:
- the title
-
setTitle
Change the title- Parameters:
title
- Title can be in either JSON or just text- Returns:
- The BossBar object
-
getHealth
float getHealth()Get the health- Returns:
- float between 0F - 1F
-
setHealth
Change the health- Parameters:
health
- this float has to be between 0F - 1F- Returns:
- The BossBar object
-
getColor
BossColor getColor()Get the bossbar color- Returns:
- The colour
-
setColor
Yay, colors!- Parameters:
color
- Whatever color you want!- Returns:
- The BossBar object
-
getStyle
BossStyle getStyle()Get the bosbar style- Returns:
- BossStyle
-
setStyle
Change the bosbar style- Parameters:
style
- BossStyle- Returns:
- The BossBar object
-
addPlayer
Show the bossbar to a player (uuid). This only works for frontend connections. Use #addConnection(UserConnection) for other types.- Parameters:
player
- uuid of the player- Returns:
- The BossBar object
-
addConnection
Show the bossbar to a player connection.- Parameters:
conn
- UserConnection of the connection- Returns:
- The BossBar object
-
removePlayer
Removes the bossbar from a player. This only works for frontend connections. For others types, use #removeConnection(UserConnection)- Parameters:
uuid
- The players UUID- Returns:
- The BossBar object
-
removeConnection
Removes the bossbar from a player connection.- Parameters:
conn
- The UserConnection- Returns:
- The BossBar object
-
addFlag
Add flags- Parameters:
flag
- The flag to add- Returns:
- The BossBar object
-
removeFlag
Remove flags.- Parameters:
flag
- The flag to remove- Returns:
- The BossBar object
-
hasFlag
- Parameters:
flag
- The flag to check against- Returns:
- True if it has the flag
-
getPlayers
Get players. Only returns UUIDs which are front-end. For all connections, use #getConnections()- Returns:
- UUIDS from players (sorry I lied)
-
getConnections
Set<UserConnection> getConnections()Get UserConnections.- Returns:
- UserConnection from players
-
show
BossBar show()Show the bossbar to everyone (In the getPlayer set)- Returns:
- The BossBar object
-
hide
BossBar hide()Hide the bossbar from everyone (In the getPlayer set)- Returns:
- The BossBar object
-
isVisible
boolean isVisible()Is it visible?- Returns:
- visibility changable with show() and hide()
-
getId
UUID getId()Get the UUID of this bossbar- Returns:
- Unique Id for this bossbar
-