Interface BossBar
-
@Deprecated public interface BossBar
Deprecated.Replaced withBossBar
Represents a boss bar, which can be send to a (group of) player(s). Boss bars only work on 1.9 and above.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addFlags(BossBarFlag... flags)
Deprecated.Adds new flags to the boss bar.void
addPlayer(Player player)
Deprecated.Adds player to this boss bar.void
addPlayers(Iterable<Player> players)
Deprecated.Adds all specified players to this boss bar.BossBarColor
getColor()
Deprecated.Gets the color of the boss bar.Collection<BossBarFlag>
getFlags()
Deprecated.Returns a copy of of theCollection
of allBossBarFlag
s added to the boss bar.BossBarOverlay
getOverlay()
Deprecated.Gets the overlay of the boss bar.float
getPercent()
Deprecated.Gets the boss bar's percent.Collection<Player>
getPlayers()
Deprecated.Returns a copy of theCollection
of allPlayer
added to the boss bar.net.kyori.text.Component
getTitle()
Deprecated.Gets the title of this boss bar.boolean
isVisible()
Deprecated.Returns whenever this boss bar is visible to all addedgetPlayers()
.void
removeAllPlayers()
Deprecated.Removes all players, that see this boss bar.void
removeFlag(BossBarFlag flag)
Deprecated.Removes flag from the boss bar.void
removeFlags(BossBarFlag... flags)
Deprecated.Removes flags from the boss bar.void
removePlayer(Player player)
Deprecated.Removes player from this boss bar.void
removePlayers(Iterable<Player> players)
Deprecated.Removes all specified players from this boss bar.void
setColor(BossBarColor color)
Deprecated.Sets a new color of the boss bar.void
setOverlay(BossBarOverlay overlay)
Deprecated.Sets a new overlay of the boss bar.void
setPercent(float percent)
Deprecated.Sets a new percent of the boss bar.void
setTitle(net.kyori.text.Component title)
Deprecated.Sets a new title of the boss bar.void
setVisible(boolean visible)
Deprecated.Sets a new visibility to the boss bar.
-
-
-
Method Detail
-
addPlayers
void addPlayers(Iterable<Player> players)
Deprecated.Adds all specified players to this boss bar.- Parameters:
players
- players- See Also:
addPlayer(Player)
-
addPlayer
void addPlayer(Player player)
Deprecated.Adds player to this boss bar. This adds the player to thegetPlayers()
and makes him see the boss bar.- Parameters:
player
- the player you wish to add
-
removePlayer
void removePlayer(Player player)
Deprecated.Removes player from this boss bar. This removes the player fromgetPlayers()
and makes him not see the boss bar.- Parameters:
player
- the player you wish to remove
-
removePlayers
void removePlayers(Iterable<Player> players)
Deprecated.Removes all specified players from this boss bar.- Parameters:
players
- players- See Also:
removePlayer(Player)
-
removeAllPlayers
void removeAllPlayers()
Deprecated.Removes all players, that see this boss bar.- See Also:
removePlayer(Player)
-
getTitle
net.kyori.text.Component getTitle()
Deprecated.Gets the title of this boss bar.- Returns:
- title
-
setTitle
void setTitle(net.kyori.text.Component title)
Deprecated.Sets a new title of the boss bar.- Parameters:
title
- new title
-
getPercent
float getPercent()
Deprecated.Gets the boss bar's percent.- Returns:
- percent
-
setPercent
void setPercent(float percent)
Deprecated.Sets a new percent of the boss bar.- Parameters:
percent
- a float between 0 and 1, representing boss bar's percent- Throws:
IllegalArgumentException
- if the new percent is not between 0 and 1
-
getPlayers
Collection<Player> getPlayers()
Deprecated.Returns a copy of theCollection
of allPlayer
added to the boss bar. Can be empty.- Returns:
- players
-
getColor
BossBarColor getColor()
Deprecated.Gets the color of the boss bar.- Returns:
- boss bar color
-
setColor
void setColor(BossBarColor color)
Deprecated.Sets a new color of the boss bar.- Parameters:
color
- the color you wish the boss bar be displayed with
-
getOverlay
BossBarOverlay getOverlay()
Deprecated.Gets the overlay of the boss bar.- Returns:
- boss bar overlay
-
setOverlay
void setOverlay(BossBarOverlay overlay)
Deprecated.Sets a new overlay of the boss bar.- Parameters:
overlay
- the overlay you wish the boss bar be displayed with
-
isVisible
boolean isVisible()
Deprecated.Returns whenever this boss bar is visible to all addedgetPlayers()
. By default, it returnstrue
.- Returns:
true
if visible, otherwisefalse
-
setVisible
void setVisible(boolean visible)
Deprecated.Sets a new visibility to the boss bar.- Parameters:
visible
- boss bar visibility value
-
getFlags
Collection<BossBarFlag> getFlags()
Deprecated.Returns a copy of of theCollection
of allBossBarFlag
s added to the boss bar.- Returns:
- flags
-
addFlags
void addFlags(BossBarFlag... flags)
Deprecated.Adds new flags to the boss bar.- Parameters:
flags
- the flags you wish to add
-
removeFlag
void removeFlag(BossBarFlag flag)
Deprecated.Removes flag from the boss bar.- Parameters:
flag
- the flag you wish to remove
-
removeFlags
void removeFlags(BossBarFlag... flags)
Deprecated.Removes flags from the boss bar.- Parameters:
flags
- the flags you wish to remove
-
-