Interface ProgressBar

All Superinterfaces:
Composable, ComposableLike, Configurable<ProgressBar>

public interface ProgressBar extends Composable, Configurable<ProgressBar>
A progress bar is a dynamic component that renders progress inside itself.
See more in Flare docs: Progress Bar
  • Method Details

    • fullBuilder

      static ItemStackBuilder fullBuilder(org.bukkit.Material material, float progress, boolean dotted)
      Returns an item builder for a full progress bar part
      Parameters:
      material - Base material
      progress - Bar progress
      dotted - Whether the display should be dotted.
      Returns:
      An item builder for a full progress bar part
      See Also:
    • emptyBuilder

      static ItemStackBuilder emptyBuilder(org.bukkit.Material material, float progress, boolean dotted)
      Returns an item builder for an empty progress bar part
      Parameters:
      material - Base material
      progress - Bar progress
      dotted - Whether the display should be dotted.
      Returns:
      An item builder for an empty progress bar part
      See Also:
    • fullProvider

      @NotNull static @NotNull ItemProvider fullProvider(ReactiveState<Float> state, org.bukkit.Material material, boolean dotted)
      Returns an item builder for a full progress bar part
      Parameters:
      material - Base material
      state - The bar progress reactive state
      dotted - Whether the display should be dotted.
      Returns:
      An item builder for a full progress bar part
      See Also:
    • emptyProvider

      @NotNull static @NotNull ItemProvider emptyProvider(ReactiveState<Float> state, org.bukkit.Material material, boolean dotted)
      Returns an item builder for an empty progress bar part
      Parameters:
      material - Base material
      state - The bar progress reactive state
      dotted - Whether the display should be dotted.
      Returns:
      An item builder for an empty progress bar part
      See Also:
    • of

      @NotNull static @NotNull ProgressBar of(ItemProvider full, ItemProvider empty)
      Constructs a progress bar with full and empty item providers
      Parameters:
      full - Item provider for filled part
      empty - Item provider for empty part
      Returns:
      A progress bar with full and empty item providers
    • of

      @NotNull static @NotNull ProgressBar of(ItemProvider full, ItemProvider empty, @org.jetbrains.annotations.Range(from=0L, to=1L) float progress)
      Constructs a progress bar with full and empty item providers and base progress
      Parameters:
      full - Item provider for filled part
      empty - Item provider for empty part
      progress - Starting progress of the bar.
      Returns:
      A progress bar with full and empty item providers
    • progressState

      ReactiveState<Float> progressState()
      Returns the current progress state
      Returns:
      Current progress state.
    • getProgress

      default @org.jetbrains.annotations.Range(from=0L, to=1L) float getProgress()
      Gets current bar progress
      Returns:
      Current bar progress
    • setProgress

      default void setProgress(@org.jetbrains.annotations.Range(from=0L, to=1L) float newProgress)
      Sets the bar progress
      Parameters:
      newProgress - New progress