Class BossBarBuilder

java.lang.Object
de.maxbossing.maxapi.Builders.BossBarBuilder

public class BossBarBuilder extends Object
Banner Builder
Author:
max
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new BossBarBuilder with the default title "Bossbar", color BarColor.PURPLE, and style BarStyle.SOLID.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFlag(org.bukkit.boss.BarFlag flag)
    Adds the specified flag to the boss bar.
    void
    addFlags(org.bukkit.boss.BarFlag... flags)
    Adds the specified flags to the boss bar.
    void
    addPlayer(org.bukkit.entity.Player player)
    Adds the specified player to the boss bar.
    void
    addPlayers(org.bukkit.entity.Player... players)
    Adds the specified players to the boss bar.
    org.bukkit.boss.BarColor
    Gets the color of the boss bar.
    List<org.bukkit.entity.Player>
    Gets a list of players that can see the boss bar.
    double
    Gets the progress of the boss bar, from 0.0 to 1.0.
    org.bukkit.boss.BarStyle
    Gets the style of the boss bar.
    Gets the title of the boss bar.
    void
    removeFlag(org.bukkit.boss.BarFlag flag)
    Removes the specified flag from the boss bar.
    void
    removeFlags(org.bukkit.boss.BarFlag... flags)
    Removes the specified flags from the boss bar.
    void
    removePlayer(org.bukkit.entity.Player player)
    Removes the specified player from the boss bar.
    void
    removePlayers(org.bukkit.entity.Player... players)
    Removes the specified players from the boss bar.
    void
    setColor(org.bukkit.boss.BarColor color)
    Sets the color of the boss bar.
    void
    setProgress(double progress)
    Sets the progress of the boss bar.
    void
    setStyle(org.bukkit.boss.BarStyle style)
    Sets the style of the boss bar.
    void
    Sets the title of the boss bar.
    void
    setVisible(boolean visible)
    Sets the visibility of the boss bar.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BossBarBuilder

      public BossBarBuilder()
      Constructs a new BossBarBuilder with the default title "Bossbar", color BarColor.PURPLE, and style BarStyle.SOLID.
  • Method Details

    • setTitle

      public void setTitle(String title)
      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

      public List<org.bukkit.entity.Player> getPlayers()
      Gets a list of players that can see the boss bar.
      Returns:
      a list of players that can see the boss bar
    • getTitle

      public String 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