Class ViaFacet<V>

  • All Implemented Interfaces:
    net.kyori.adventure.platform.facet.Facet<V>, net.kyori.adventure.platform.facet.Facet.Message<V,​java.lang.String>
    Direct Known Subclasses:
    ViaFacet.BossBar.Builder, ViaFacet.BossBar.Builder1_9_To_1_15, ViaFacet.ProtocolBased

    public class ViaFacet<V>
    extends net.kyori.adventure.platform.facet.FacetBase<V>
    implements net.kyori.adventure.platform.facet.Facet.Message<V,​java.lang.String>
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ViaFacet.ActionBar<V>  
      static class  ViaFacet.ActionBarTitle<V>  
      static class  ViaFacet.BossBar<V>  
      static class  ViaFacet.Chat<V>  
      static class  ViaFacet.ProtocolBased<V>  
      static class  ViaFacet.TabList<V>  
      static class  ViaFacet.Title<V>  
      • Nested classes/interfaces inherited from interface net.kyori.adventure.platform.facet.Facet

        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.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.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.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
    • Constructor Summary

      Constructors 
      Constructor Description
      ViaFacet​(@NotNull java.lang.Class<? extends V> viewerClass, @NotNull java.util.function.Function<V,​com.viaversion.viaversion.api.connection.UserConnection> connectionFunction, int minProtocol)  
    • Constructor Detail

      • ViaFacet

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

      • isSupported

        public boolean isSupported()
        Specified by:
        isSupported in interface net.kyori.adventure.platform.facet.Facet<V>
        Overrides:
        isSupported in class net.kyori.adventure.platform.facet.FacetBase<V>
      • isApplicable

        public boolean isApplicable​(@NotNull
                                    V viewer)
        Specified by:
        isApplicable in interface net.kyori.adventure.platform.facet.Facet<V>
        Overrides:
        isApplicable in class net.kyori.adventure.platform.facet.FacetBase<V>
      • findConnection

        @Nullable
        public @Nullable com.viaversion.viaversion.api.connection.UserConnection findConnection​(@NotNull
                                                                                                V viewer)
      • findProtocol

        public int findProtocol​(@NotNull
                                V viewer)
      • createMessage

        @NotNull
        public @NotNull java.lang.String createMessage​(@NotNull
                                                       V viewer,
                                                       @NotNull
                                                       @NotNull Component message)
        Specified by:
        createMessage in interface net.kyori.adventure.platform.facet.Facet.Message<V,​java.lang.String>