java.lang.Object
com.bencodez.advancedcore.api.misc.effects.BossBar

public class BossBar extends Object
The Class BossBar.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BossBar(String msg, String barColor, String barStyle, double progress)
    Instantiates a new boss bar.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPlayer(org.bukkit.entity.Player player)
    Adds a player to the boss bar.
    void
    addPlayer(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.
    void
    Hides the boss bar.
    void
    removePlayer(org.bukkit.entity.Player player)
    Removes a player from the boss bar.
    void
    Sends the boss bar to all players.
    void
    send(int delay)
    Sends the boss bar with delay.
    void
    send(org.bukkit.entity.Player player, int delay)
    Send.
    void
    setColor(String barColor)
    Sets the color of the boss bar.
    void
    setProgress(double progress)
    Sets the progress of the boss bar.
    void
    setStyle(String barStyle)
    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

    • BossBar

      public BossBar(String msg, String barColor, String barStyle, double progress)
      Instantiates a new boss bar.
      Parameters:
      msg - the msg
      barColor - the bar color
      barStyle - the bar style
      progress - 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 add
      delay - the delay in seconds before removing
    • getPlayers

      public List<org.bukkit.entity.Player> 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 player
      delay - the delay
    • setColor

      public void setColor(String barColor)
      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

      public void setStyle(String barStyle)
      Sets the style of the boss bar.
      Parameters:
      barStyle - the bar style
    • setTitle

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