Class BossBar
java.lang.Object
com.bencodez.advancedcore.api.misc.effects.BossBar
The Class BossBar.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlayer(org.bukkit.entity.Player player) Adds a player to the boss bar.voidaddPlayer(org.bukkit.entity.Player player, int delay) Adds a player to the boss bar with delay.List<org.bukkit.entity.Player> Gets the players viewing the boss bar.voidhide()Hides the boss bar.voidremovePlayer(org.bukkit.entity.Player player) Removes a player from the boss bar.voidsend()Sends the boss bar to all players.voidsend(int delay) Sends the boss bar with delay.voidsend(org.bukkit.entity.Player player, int delay) Send.voidSets the color of the boss bar.voidsetProgress(double progress) Sets the progress of the boss bar.voidSets the style of the boss bar.voidSets the title of the boss bar.voidsetVisible(boolean visible) Sets the visibility of the boss bar.
-
Constructor Details
-
BossBar
Instantiates a new boss bar.- Parameters:
msg- the msgbarColor- the bar colorbarStyle- the bar styleprogress- the progress
-
-
Method Details
-
addPlayer
public void addPlayer(org.bukkit.entity.Player player) Adds a player to the boss bar.- Parameters:
player- the player to add
-
addPlayer
public void addPlayer(org.bukkit.entity.Player player, int delay) Adds a player to the boss bar with delay.- Parameters:
player- the player to adddelay- the delay in seconds before removing
-
getPlayers
Gets the players viewing the boss bar.- Returns:
- the list of players
-
hide
public void hide()Hides the boss bar. -
removePlayer
public void removePlayer(org.bukkit.entity.Player player) Removes a player from the boss bar.- Parameters:
player- the player to remove
-
send
public void send()Sends the boss bar to all players. -
send
public void send(int delay) Sends the boss bar with delay.- Parameters:
delay- the delay in seconds
-
send
public void send(org.bukkit.entity.Player player, int delay) Send.- Parameters:
player- the playerdelay- the delay
-
setColor
Sets the color of the boss bar.- Parameters:
barColor- the bar color
-
setProgress
public void setProgress(double progress) Sets the progress of the boss bar.- Parameters:
progress- the progress (0.0 to 1.0)
-
setStyle
Sets the style of the boss bar.- Parameters:
barStyle- the bar style
-
setTitle
Sets the title of the boss bar.- Parameters:
title- the title
-
setVisible
public void setVisible(boolean visible) Sets the visibility of the boss bar.- Parameters:
visible- true to show, false to hide
-