Package de.maxbossing.maxapi.Builders
Class BossBarBuilder
java.lang.Object
de.maxbossing.maxapi.Builders.BossBarBuilder
Banner Builder
- Author:
- max
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new BossBarBuilder with the default title "Bossbar", colorBarColor.PURPLE, and styleBarStyle.SOLID. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFlag(org.bukkit.boss.BarFlag flag) Adds the specified flag to the boss bar.voidaddFlags(org.bukkit.boss.BarFlag... flags) Adds the specified flags to the boss bar.voidaddPlayer(org.bukkit.entity.Player player) Adds the specified player to the boss bar.voidaddPlayers(org.bukkit.entity.Player... players) Adds the specified players to the boss bar.org.bukkit.boss.BarColorgetColor()Gets the color of the boss bar.List<org.bukkit.entity.Player>Gets a list of players that can see the boss bar.doubleGets the progress of the boss bar, from 0.0 to 1.0.org.bukkit.boss.BarStylegetStyle()Gets the style of the boss bar.getTitle()Gets the title of the boss bar.voidremoveFlag(org.bukkit.boss.BarFlag flag) Removes the specified flag from the boss bar.voidremoveFlags(org.bukkit.boss.BarFlag... flags) Removes the specified flags from the boss bar.voidremovePlayer(org.bukkit.entity.Player player) Removes the specified player from the boss bar.voidremovePlayers(org.bukkit.entity.Player... players) Removes the specified players from the boss bar.voidsetColor(org.bukkit.boss.BarColor color) Sets the color of the boss bar.voidsetProgress(double progress) Sets the progress of the boss bar.voidsetStyle(org.bukkit.boss.BarStyle style) Sets 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
-
BossBarBuilder
public BossBarBuilder()Constructs a new BossBarBuilder with the default title "Bossbar", colorBarColor.PURPLE, and styleBarStyle.SOLID.
-
-
Method Details
-
setTitle
Sets the title of the boss bar.- Parameters:
title- the title to set
-
setColor
public void setColor(org.bukkit.boss.BarColor color) Sets the color of the boss bar.- Parameters:
color- the color to set
-
setStyle
public void setStyle(org.bukkit.boss.BarStyle style) Sets the style of the boss bar.- Parameters:
style- the style to set
-
setProgress
public void setProgress(double progress) Sets the progress of the boss bar.- Parameters:
progress- the progress to set, from 0.0 to 1.0
-
setVisible
public void setVisible(boolean visible) Sets the visibility of the boss bar.- Parameters:
visible- whether the boss bar should be visible or not
-
addPlayer
public void addPlayer(org.bukkit.entity.Player player) Adds the specified player to the boss bar.- Parameters:
player- the player to add
-
addPlayers
public void addPlayers(org.bukkit.entity.Player... players) Adds the specified players to the boss bar.- Parameters:
players- the players to add
-
removePlayer
public void removePlayer(org.bukkit.entity.Player player) Removes the specified player from the boss bar.- Parameters:
player- the player to remove
-
removePlayers
public void removePlayers(org.bukkit.entity.Player... players) Removes the specified players from the boss bar.- Parameters:
players- the players to remove
-
addFlag
public void addFlag(org.bukkit.boss.BarFlag flag) Adds the specified flag to the boss bar.- Parameters:
flag- the flag to add
-
addFlags
public void addFlags(org.bukkit.boss.BarFlag... flags) Adds the specified flags to the boss bar.- Parameters:
flags- the flags to add to the boss bar
-
removeFlag
public void removeFlag(org.bukkit.boss.BarFlag flag) Removes the specified flag from the boss bar.- Parameters:
flag- the flag to remove from the boss bar
-
removeFlags
public void removeFlags(org.bukkit.boss.BarFlag... flags) Removes the specified flags from the boss bar.- Parameters:
flags- the flags to remove from the boss bar
-
getPlayers
Gets a list of players that can see the boss bar.- Returns:
- a list of players that can see the boss bar
-
getTitle
Gets the title of the boss bar.- Returns:
- the title of the boss bar
-
getColor
public org.bukkit.boss.BarColor getColor()Gets the color of the boss bar.- Returns:
- the color of the boss bar
-
getStyle
public org.bukkit.boss.BarStyle getStyle()Gets the style of the boss bar.- Returns:
- the style of the boss bar
-
getProgress
public double getProgress()Gets the progress of the boss bar, from 0.0 to 1.0.- Returns:
- the progress of the boss bar
-