Class ViaFacet<V>

java.lang.Object
net.kyori.adventure.platform.facet.FacetBase<V>
net.kyori.adventure.platform.viaversion.ViaFacet<V>
All Implemented Interfaces:
net.kyori.adventure.platform.facet.Facet<V>, net.kyori.adventure.platform.facet.Facet.Message<V,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,String>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
    static final class 
     
    static class 
     
    static class 
     
    static final class 
     
    static class 
     

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

    net.kyori.adventure.platform.facet.Facet.Book<V extends Object,M extends Object,B 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.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.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
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    @NotNull String
    createMessage(V viewer, @NotNull Component message)
     
    @Nullable com.viaversion.viaversion.api.connection.UserConnection
    findConnection(V viewer)
     
    int
    findProtocol(V viewer)
     
    boolean
    isApplicable(V viewer)
     
    boolean
     

    Methods inherited from class java.lang.Object

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

    • ViaFacet

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

    • 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 String createMessage(@NotNull V viewer, @NotNull @NotNull Component message)
      Specified by:
      createMessage in interface net.kyori.adventure.platform.facet.Facet.Message<V,String>