Package me.totalfreedom.display
Class BossBarDisplay.BossBarBuilder
java.lang.Object
me.totalfreedom.display.BossBarDisplay.BossBarBuilder
- Enclosing class:
- BossBarDisplay
A Builder class for
BossBar objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFlag(net.kyori.adventure.bossbar.BossBar.Flag flag) Adds a flag to the boss bar.addFlags(net.kyori.adventure.bossbar.BossBar.Flag... flags) Adds multiple flags to the boss bar.net.kyori.adventure.bossbar.BossBarbuild()Builds the boss bar.Clears all flags from the boss bar.removeFlag(net.kyori.adventure.bossbar.BossBar.Flag flag) Removes a flag from the boss bar.removeFlags(net.kyori.adventure.bossbar.BossBar.Flag... flags) Removes multiple flags from the boss bar.setColor(net.kyori.adventure.bossbar.BossBar.Color color) Sets the color of the boss bar.Sets the name of the boss bar using a String.Sets the name of the boss bar using a String and aTextColor.setName(net.kyori.adventure.text.Component name) Sets the name of the boss bar.setOverlay(net.kyori.adventure.bossbar.BossBar.Overlay overlay) Sets the overlay of the boss bar.setProgress(@org.jetbrains.annotations.Range(from=0L, to=100L) float progress) Sets the progress of the boss bar.
-
Constructor Details
-
BossBarBuilder
public BossBarBuilder()Initializes this Builder object.
-
-
Method Details
-
setName
Sets the name of the boss bar.- Parameters:
name- The name of the boss bar.- Returns:
- The builder.
-
setName
public BossBarDisplay.BossBarBuilder setName(String name, net.kyori.adventure.text.format.TextColor color) Sets the name of the boss bar using a String and aTextColor.- Parameters:
name- The name of the boss bar.color- The color of the boss bar.- Returns:
- The builder.
-
setName
Sets the name of the boss bar using a String.- Parameters:
name- The name of the boss bar.- Returns:
- The builder.
-
addFlag
Adds a flag to the boss bar.- Parameters:
flag- The flag to add.- Returns:
- The builder.
-
addFlags
Adds multiple flags to the boss bar.- Parameters:
flags- The flags to add.- Returns:
- The builder.
-
removeFlag
Removes a flag from the boss bar.- Parameters:
flag- The flag to remove.- Returns:
- The builder.
-
removeFlags
Removes multiple flags from the boss bar.- Parameters:
flags- The flags to remove.- Returns:
- The builder.
-
clearFlags
Clears all flags from the boss bar.- Returns:
- The builder.
-
setColor
Sets the color of the boss bar.- Parameters:
color- The color of the boss bar.- Returns:
- The builder.
-
setOverlay
public BossBarDisplay.BossBarBuilder setOverlay(net.kyori.adventure.bossbar.BossBar.Overlay overlay) Sets the overlay of the boss bar.- Parameters:
overlay- The overlay of the boss bar.- Returns:
- The builder.
-
setProgress
public BossBarDisplay.BossBarBuilder setProgress(@org.jetbrains.annotations.Range(from=0L, to=100L) float progress) Sets the progress of the boss bar. This must satisfy0 <= progress <= 100.- Parameters:
progress- The progress of the boss bar.- Returns:
- The builder.
-
build
public net.kyori.adventure.bossbar.BossBar build()Builds the boss bar.- Returns:
- The
BossBar.
-