Interface Facet.Title<V,M,C,T>

Type Parameters:
V - a viewer type
M - a message type
C - a collection type
T - a completed title type
All Superinterfaces:
Facet<V>, Facet.Message<V,M>
All Known Subinterfaces:
Facet.TitlePacket<V,M,C,T>
Enclosing interface:
Facet<V>

public static interface Facet.Title<V,M,C,T> extends Facet.Message<V,M>
A facet that shows, clears, and resets titles.
Since:
4.0.0
  • Field Details

  • Method Details

    • createTitleCollection

      @NotNull C createTitleCollection()
      Creates a collection that will receive title parts.
      Returns:
      the collection
      Since:
      4.0.0
    • contributeTitle

      void contributeTitle(@NotNull C coll, @NotNull M title)
      Contribute a title part to the title builder.

      This will only be called if a title is present

      Parameters:
      coll - collection
      title - title text
      Since:
      4.0.0
    • contributeSubtitle

      void contributeSubtitle(@NotNull C coll, @NotNull M subtitle)
      Contribute a subtitle part to the title builder.

      This will only be called if a subtitle is present

      Parameters:
      coll - collection
      subtitle - subtitle text
      Since:
      4.0.0
    • contributeTimes

      void contributeTimes(@NotNull C coll, int inTicks, int stayTicks, int outTicks)
      Contribute a times part to the title builder.

      This will only be called if times are present

      Parameters:
      coll - collection
      inTicks - number of fade in ticks
      stayTicks - number of stay ticks
      outTicks - number of fade out ticks
      Since:
      4.0.0
    • completeTitle

      @Nullable T completeTitle(@NotNull C coll)
      Complete a title.
      Parameters:
      coll - The in-progress collection of parts
      Returns:
      a title or null
      Since:
      4.0.0
    • showTitle

      void showTitle(@NotNull V viewer, @NotNull T title)
      Shows a title.
      Parameters:
      viewer - a viewer
      title - a title
      Since:
      4.0.0
    • clearTitle

      void clearTitle(@NotNull V viewer)
      Clears a title.
      Parameters:
      viewer - a viewer
      Since:
      4.0.0
    • resetTitle

      void resetTitle(@NotNull V viewer)
      Resets a title.
      Parameters:
      viewer - a viewer
      Since:
      4.0.0
    • toTicks

      default int toTicks(@Nullable @Nullable Duration duration)
      Gets the ticks for a duration.
      Parameters:
      duration - a duration
      Returns:
      the ticks
      Since:
      4.0.0