Class BossBarDisplay.BossBarBuilder

java.lang.Object
me.totalfreedom.display.BossBarDisplay.BossBarBuilder
Enclosing class:
BossBarDisplay

public static final class BossBarDisplay.BossBarBuilder extends Object
A Builder class for BossBar objects.
  • Constructor Details

    • BossBarBuilder

      public BossBarBuilder()
      Initializes this Builder object.
  • Method Details

    • setName

      public BossBarDisplay.BossBarBuilder setName(net.kyori.adventure.text.Component name)
      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 a TextColor.
      Parameters:
      name - The name of the boss bar.
      color - The color of the boss bar.
      Returns:
      The builder.
    • setName

      public BossBarDisplay.BossBarBuilder setName(String name)
      Sets the name of the boss bar using a String.
      Parameters:
      name - The name of the boss bar.
      Returns:
      The builder.
    • addFlag

      public BossBarDisplay.BossBarBuilder addFlag(net.kyori.adventure.bossbar.BossBar.Flag flag)
      Adds a flag to the boss bar.
      Parameters:
      flag - The flag to add.
      Returns:
      The builder.
    • addFlags

      public BossBarDisplay.BossBarBuilder addFlags(net.kyori.adventure.bossbar.BossBar.Flag... flags)
      Adds multiple flags to the boss bar.
      Parameters:
      flags - The flags to add.
      Returns:
      The builder.
    • removeFlag

      public BossBarDisplay.BossBarBuilder removeFlag(net.kyori.adventure.bossbar.BossBar.Flag flag)
      Removes a flag from the boss bar.
      Parameters:
      flag - The flag to remove.
      Returns:
      The builder.
    • removeFlags

      public BossBarDisplay.BossBarBuilder removeFlags(net.kyori.adventure.bossbar.BossBar.Flag... flags)
      Removes multiple flags from the boss bar.
      Parameters:
      flags - The flags to remove.
      Returns:
      The builder.
    • clearFlags

      public BossBarDisplay.BossBarBuilder clearFlags()
      Clears all flags from the boss bar.
      Returns:
      The builder.
    • setColor

      public BossBarDisplay.BossBarBuilder setColor(net.kyori.adventure.bossbar.BossBar.Color color)
      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 satisfy 0 <= 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.