Class ViaFacet.ProtocolBased<V>

    • Nested Class Summary

      • 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 
      Modifier Constructor Description
      protected ProtocolBased​(@NotNull java.lang.String fromProtocol, @NotNull java.lang.String toProtocol, int minProtocol, @NotNull java.lang.String packetName, @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
      com.viaversion.viaversion.api.protocol.packet.PacketWrapper createPacket​(V viewer)  
      boolean isSupported()  
      @NotNull com.viaversion.viaversion.libs.gson.JsonElement parse​(@NotNull java.lang.String message)  
      void sendPacket​(@NotNull com.viaversion.viaversion.api.protocol.packet.PacketWrapper packet)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProtocolBased

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

      • isSupported

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

        public com.viaversion.viaversion.api.protocol.packet.PacketWrapper createPacket​(@NotNull
                                                                                        V viewer)
      • sendPacket

        public void sendPacket​(@NotNull
                               @NotNull com.viaversion.viaversion.api.protocol.packet.PacketWrapper packet)
      • parse

        @NotNull
        public @NotNull com.viaversion.viaversion.libs.gson.JsonElement parse​(@NotNull
                                                                              @NotNull java.lang.String message)