Class ViaFacet.Title<V>

  • All Implemented Interfaces:
    net.kyori.adventure.platform.facet.Facet<V>, net.kyori.adventure.platform.facet.Facet.Message<V,​java.lang.String>, net.kyori.adventure.platform.facet.Facet.Title<V,​java.lang.String,​java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,​java.util.function.Consumer<V>>, net.kyori.adventure.platform.facet.Facet.TitlePacket<V,​java.lang.String,​java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,​java.util.function.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,​java.lang.String,​java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,​java.util.function.Consumer<V>>
    • Nested Class Summary

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

        net.kyori.adventure.platform.facet.Facet.ActionBar<V extends java.lang.Object,​M extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Book<V extends java.lang.Object,​M extends java.lang.Object,​B extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.BossBar<V extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.BossBarEntity<V extends java.lang.Object,​P extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.BossBarPacket<V extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Chat<V extends java.lang.Object,​M extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.ChatPacket<V extends java.lang.Object,​M extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.EntitySound<V extends java.lang.Object,​M extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.FakeEntity<V extends java.lang.Object,​P extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Message<V extends java.lang.Object,​M extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Pointers<V extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Position<V extends java.lang.Object,​P extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Sound<V extends java.lang.Object,​P extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.TabList<V extends java.lang.Object,​M extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.Title<V extends java.lang.Object,​M extends java.lang.Object,​C extends java.lang.Object,​T extends java.lang.Object>, net.kyori.adventure.platform.facet.Facet.TitlePacket<V extends java.lang.Object,​M extends java.lang.Object,​C extends java.lang.Object,​T extends java.lang.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 java.lang.Class<? extends V> viewerClass, @NotNull java.util.function.Function<V,​com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)  
      protected Title​(@NotNull java.lang.String fromProtocol, @NotNull java.lang.String toProtocol, int minProtocol, @NotNull java.lang.Class<? extends V> viewerClass, @NotNull java.util.function.Function<V,​com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearTitle​(V viewer)  
      @Nullable java.util.function.Consumer<V> completeTitle​(@NotNull java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll)  
      void contributeSubtitle​(@NotNull java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, @NotNull java.lang.String subtitle)  
      void contributeTimes​(@NotNull java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, int inTicks, int stayTicks, int outTicks)  
      void contributeTitle​(@NotNull java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> coll, @NotNull java.lang.String title)  
      @NotNull java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>> createTitleCollection()  
      void resetTitle​(V viewer)  
      void showTitle​(V viewer, @NotNull java.util.function.Consumer<V> title)  
      • 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 Detail

      • Title

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

        public Title​(@NotNull
                     @NotNull java.lang.Class<? extends V> viewerClass,
                     @NotNull
                     @NotNull java.util.function.Function<V,​com.viaversion.viaversion.api.connection.UserConnection> connectionFunction)
    • Method Detail

      • createTitleCollection

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

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

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

        public void contributeTimes​(@NotNull
                                    @NotNull java.util.List<java.util.function.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,​java.lang.String,​java.util.List<java.util.function.Consumer<com.viaversion.viaversion.api.protocol.packet.PacketWrapper>>,​java.util.function.Consumer<V>>
      • completeTitle

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

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

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

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