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

  • Type Parameters:
    V - a viewer type
    M - a message type
    T - a title type
    All Superinterfaces:
    Facet<V>, Facet.Message<V,​M>
    All Known Subinterfaces:
    Facet.TitlePacket<V,​M,​T>
    All Known Implementing Classes:
    ViaFacet.Title
    Enclosing interface:
    Facet<V>

    public static interface Facet.Title<V,​M,​T>
    extends Facet.Message<V,​M>
    A facet that shows, clears, and resets titles.
    • Method Detail

      • createTitle

        @Nullable T createTitle​(@Nullable M title,
                                @Nullable M subTitle,
                                int inTicks,
                                int stayTicks,
                                int outTicks)
        Creates a title.
        Parameters:
        title - a title or null if empty
        subTitle - a subtitle or null if empty
        inTicks - number of fade in ticks
        stayTicks - number of stay ticks
        outTicks - number of fade out ticks
        Returns:
        a title or null
      • showTitle

        void showTitle​(@NonNull V viewer,
                       @NonNull T title)
        Shows a title.
        Parameters:
        viewer - a viewer
        title - a title
      • clearTitle

        void clearTitle​(@NonNull V viewer)
        Clears a title.
        Parameters:
        viewer - a viewer
      • resetTitle

        void resetTitle​(@NonNull V viewer)
        Resets a title.
        Parameters:
        viewer - a viewer
      • toTicks

        default int toTicks​(@Nullable java.time.Duration duration)
        Gets the ticks for a duration.
        Parameters:
        duration - a duration
        Returns:
        the ticks