Class ViaFacet.Title<V>

java.lang.Object
net.kyori.adventure.platform.facet.FacetBase<V>
All Implemented Interfaces:
net.kyori.adventure.platform.facet.Facet<V>, net.kyori.adventure.platform.facet.Facet.Message<V,String>, net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>, net.kyori.adventure.platform.facet.Facet.TitlePacket<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
Enclosing class:
ViaFacet<V>

public static class ViaFacet.Title<V> extends ViaFacet.ProtocolBased<V> implements net.kyori.adventure.platform.facet.Facet.TitlePacket<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.kyori.adventure.platform.viaversion.ViaFacet

    ViaFacet.ActionBar<V>, ViaFacet.ActionBarTitle<V>, ViaFacet.BossBar<V>, ViaFacet.Chat<V>, ViaFacet.ProtocolBased<V>, ViaFacet.TabList<V>, ViaFacet.Title<V>

    Nested classes/interfaces inherited from interface net.kyori.adventure.platform.facet.Facet

    net.kyori.adventure.platform.facet.Facet.ActionBar<V extends Object,M extends Object>, net.kyori.adventure.platform.facet.Facet.Book<V extends Object,M extends Object,B extends Object>, net.kyori.adventure.platform.facet.Facet.BossBar<V extends Object>, net.kyori.adventure.platform.facet.Facet.BossBarEntity<V extends Object,P extends Object>, net.kyori.adventure.platform.facet.Facet.BossBarPacket<V extends Object>, net.kyori.adventure.platform.facet.Facet.Chat<V extends Object,M extends Object>, net.kyori.adventure.platform.facet.Facet.ChatPacket<V extends Object,M extends Object>, net.kyori.adventure.platform.facet.Facet.EntitySound<V extends Object,M extends Object>, net.kyori.adventure.platform.facet.Facet.FakeEntity<V extends Object,P extends Object>, net.kyori.adventure.platform.facet.Facet.Message<V extends Object,M extends Object>, net.kyori.adventure.platform.facet.Facet.Pointers<V extends Object>, net.kyori.adventure.platform.facet.Facet.Position<V extends Object,P extends Object>, net.kyori.adventure.platform.facet.Facet.Sound<V extends Object,P extends Object>, net.kyori.adventure.platform.facet.Facet.TabList<V extends Object,M extends Object>, net.kyori.adventure.platform.facet.Facet.Title<V extends Object,M extends Object,C extends Object,T extends Object>, net.kyori.adventure.platform.facet.Facet.TitlePacket<V extends Object,M extends Object,C extends Object,T extends Object>
  • Field Summary

    Fields inherited from class net.kyori.adventure.platform.facet.FacetBase

    viewerClass

    Fields inherited from interface net.kyori.adventure.platform.facet.Facet.Message

    PROTOCOL_HEX_COLOR, PROTOCOL_JSON

    Fields inherited from interface net.kyori.adventure.platform.facet.Facet.Title

    MAX_SECONDS, PROTOCOL_ACTION_BAR

    Fields inherited from interface net.kyori.adventure.platform.facet.Facet.TitlePacket

    ACTION_ACTIONBAR, ACTION_CLEAR, ACTION_RESET, ACTION_SUBTITLE, ACTION_TIMES, ACTION_TITLE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Title(@NotNull Class<? extends V> viewerClass, @NotNull Function<V,com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)
     
    protected
    Title(@NotNull String fromProtocol, @NotNull String toProtocol, int minProtocol, @NotNull Class<? extends V> viewerClass, @NotNull Function<V,com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clearTitle(V viewer)
     
    @Nullable Consumer<V>
    completeTitle(@NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll)
     
    void
    contributeSubtitle(@NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, @NotNull String subtitle)
     
    void
    contributeTimes(@NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, int inTicks, int stayTicks, int outTicks)
     
    void
    contributeTitle(@NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, @NotNull String title)
     
    @NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>
     
    void
    resetTitle(V viewer)
     
    void
    showTitle(V viewer, @NotNull Consumer<V> title)
     

    Methods inherited from class net.kyori.adventure.platform.viaversion.ViaFacet.ProtocolBased

    createPacket, isSupported, parse, sendPacket

    Methods inherited from class net.kyori.adventure.platform.viaversion.ViaFacet

    createMessage, findConnection, findProtocol, isApplicable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.kyori.adventure.platform.facet.Facet

    isApplicable, isSupported

    Methods inherited from interface net.kyori.adventure.platform.facet.Facet.Message

    createMessage

    Methods inherited from interface net.kyori.adventure.platform.facet.Facet.Title

    toTicks
  • Constructor Details

    • Title

      protected Title(@NotNull @NotNull String fromProtocol, @NotNull @NotNull String toProtocol, int minProtocol, @NotNull @NotNull Class<? extends V> viewerClass, @NotNull @NotNull Function<V,com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)
    • Title

      public Title(@NotNull @NotNull Class<? extends V> viewerClass, @NotNull @NotNull Function<V,com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)
  • Method Details

    • createTitleCollection

      @NotNull public @NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> createTitleCollection()
      Specified by:
      createTitleCollection in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • contributeTitle

      public void contributeTitle(@NotNull @NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, @NotNull @NotNull String title)
      Specified by:
      contributeTitle in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • contributeSubtitle

      public void contributeSubtitle(@NotNull @NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, @NotNull @NotNull String subtitle)
      Specified by:
      contributeSubtitle in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • contributeTimes

      public void contributeTimes(@NotNull @NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, int inTicks, int stayTicks, int outTicks)
      Specified by:
      contributeTimes in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • completeTitle

      @Nullable public @Nullable Consumer<V> completeTitle(@NotNull @NotNull List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll)
      Specified by:
      completeTitle in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • showTitle

      public void showTitle(@NotNull V viewer, @NotNull @NotNull Consumer<V> title)
      Specified by:
      showTitle in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • clearTitle

      public void clearTitle(@NotNull V viewer)
      Specified by:
      clearTitle in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>
    • resetTitle

      public void resetTitle(@NotNull V viewer)
      Specified by:
      resetTitle in interface net.kyori.adventure.platform.facet.Facet.Title<V,String,List<Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,Consumer<V>>