Interface NumberFormat

All Known Subinterfaces:
FixedFormat, StyledFormat

public interface NumberFormat
Describes a scoreboard number format that applies custom formatting to scoreboard scores.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    Creates a blank scoreboard number format that removes the score number entirely.
    fixed(@NotNull net.kyori.adventure.text.ComponentLike component)
    Creates a scoreboard number format that replaces the score number with a chat component.
    Gets an un-styled number format.
    styled(@NotNull net.kyori.adventure.text.format.Style style)
    Creates a scoreboard number format that applies a custom formatting to the score number.
    styled(@NotNull net.kyori.adventure.text.format.StyleBuilderApplicable @NotNull ... styleBuilderApplicables)
    Creates a scoreboard number format that applies a custom formatting to the score number.
  • Method Details

    • blank

      @NotNull static @NotNull NumberFormat blank()
      Creates a blank scoreboard number format that removes the score number entirely.
      Returns:
      a blank number format
    • noStyle

      @NotNull static @NotNull StyledFormat noStyle()
      Gets an un-styled number format.
      Returns:
      an un-styled number format
    • styled

      @NotNull static @NotNull StyledFormat styled(@NotNull @NotNull net.kyori.adventure.text.format.Style style)
      Creates a scoreboard number format that applies a custom formatting to the score number.
      Parameters:
      style - the style to apply on the number
      Returns:
      a styled number format
    • styled

      @NotNull static @NotNull StyledFormat styled(@NotNull @NotNull net.kyori.adventure.text.format.StyleBuilderApplicable @NotNull ... styleBuilderApplicables)
      Creates a scoreboard number format that applies a custom formatting to the score number.
      Parameters:
      styleBuilderApplicables - the style to apply on the number
      Returns:
      a styled number format
    • fixed

      @NotNull static @NotNull FixedFormat fixed(@NotNull @NotNull net.kyori.adventure.text.ComponentLike component)
      Creates a scoreboard number format that replaces the score number with a chat component.
      Parameters:
      component - the component to replace the number with
      Returns:
      a fixed number format