Class BossBarMock

java.lang.Object
be.seeseemelk.mockbukkit.boss.BossBarMock
All Implemented Interfaces:
org.bukkit.boss.BossBar
Direct Known Subclasses:
KeyedBossBarMock

public class BossBarMock extends Object implements org.bukkit.boss.BossBar
Mock implementation of BossBar.
  • Constructor Details

    • BossBarMock

      public BossBarMock(@NotNull @NotNull String title, @NotNull @NotNull org.bukkit.boss.BarColor color, @NotNull @NotNull org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag @NotNull ... flags)
      Constructs a new BossBarMock with the provided parameters.
      Parameters:
      title - The title of the bossbar.
      color - The color of the bossbar.
      style - The style of the bossbar.
      flags - The flags to set on the bossbar.
  • Method Details

    • getTitle

      @NotNull public @NotNull String getTitle()
      Specified by:
      getTitle in interface org.bukkit.boss.BossBar
    • setTitle

      public void setTitle(@Nullable @Nullable String title)
      Specified by:
      setTitle in interface org.bukkit.boss.BossBar
    • getColor

      @NotNull public @NotNull org.bukkit.boss.BarColor getColor()
      Specified by:
      getColor in interface org.bukkit.boss.BossBar
    • setColor

      public void setColor(@NotNull @NotNull org.bukkit.boss.BarColor color)
      Specified by:
      setColor in interface org.bukkit.boss.BossBar
    • getStyle

      @NotNull public @NotNull org.bukkit.boss.BarStyle getStyle()
      Specified by:
      getStyle in interface org.bukkit.boss.BossBar
    • setStyle

      public void setStyle(@NotNull @NotNull org.bukkit.boss.BarStyle style)
      Specified by:
      setStyle in interface org.bukkit.boss.BossBar
    • removeFlag

      public void removeFlag(@NotNull @NotNull org.bukkit.boss.BarFlag flag)
      Specified by:
      removeFlag in interface org.bukkit.boss.BossBar
    • addFlag

      public void addFlag(@NotNull @NotNull org.bukkit.boss.BarFlag flag)
      Specified by:
      addFlag in interface org.bukkit.boss.BossBar
    • hasFlag

      public boolean hasFlag(@NotNull @NotNull org.bukkit.boss.BarFlag flag)
      Specified by:
      hasFlag in interface org.bukkit.boss.BossBar
    • setProgress

      public void setProgress(double progress)
      Specified by:
      setProgress in interface org.bukkit.boss.BossBar
    • getProgress

      public double getProgress()
      Specified by:
      getProgress in interface org.bukkit.boss.BossBar
    • addPlayer

      public void addPlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      addPlayer in interface org.bukkit.boss.BossBar
    • removePlayer

      public void removePlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      removePlayer in interface org.bukkit.boss.BossBar
    • removeAll

      public void removeAll()
      Specified by:
      removeAll in interface org.bukkit.boss.BossBar
    • getPlayers

      @NotNull public @NotNull List<org.bukkit.entity.Player> getPlayers()
      Specified by:
      getPlayers in interface org.bukkit.boss.BossBar
    • setVisible

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface org.bukkit.boss.BossBar
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface org.bukkit.boss.BossBar
    • show

      @Deprecated(since="1.9") public void show()
      Deprecated.
      Specified by:
      show in interface org.bukkit.boss.BossBar
    • hide

      @Deprecated(since="1.9") public void hide()
      Deprecated.
      Specified by:
      hide in interface org.bukkit.boss.BossBar