Interface Title


public sealed interface Title
Represents an in-game title, which can be displayed across the centre of the screen.
Since:
4.0.0
See Also:
  • Field Details

    • DEFAULT_TIMES

      static final Title.Times DEFAULT_TIMES
      The default times.
      Since:
      4.0.0
  • Method Details

    • title

      static Title title(Component title, Component subtitle)
      Creates a title.
      Parameters:
      title - the title
      subtitle - the subtitle
      Returns:
      the title
      Since:
      4.0.0
    • title

      static Title title(Component title, Component subtitle, @Nullable Title.Times times)
      Creates a title.
      Parameters:
      title - the title
      subtitle - the subtitle
      times - the times
      Returns:
      the title
      Since:
      4.0.0
    • title

      static Title title(Component title, Component subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks)
      Creates a title.
      Parameters:
      title - the title
      subtitle - the subtitle
      fadeInTicks - duration in ticks that the title fades in
      stayTicks - duration in ticks that the title stays on screen
      fadeOutTicks - duration in ticks that the title fades out
      Returns:
      the title
      Since:
      4.24.0
    • title

      Component title()
      Gets the title.
      Returns:
      the title
      Since:
      4.0.0
    • subtitle

      Component subtitle()
      Gets the subtitle.
      Returns:
      the subtitle
      Since:
      4.0.0
    • times

      @Nullable Title.Times times()
      Gets the times.
      Returns:
      the times
      Since:
      4.0.0
    • part

      <T> @UnknownNullability T part(TitlePart<T> part)
      Gets a part.
      Type Parameters:
      T - the type of the part
      Parameters:
      part - the part
      Returns:
      the value
      Since:
      4.9.0