Class ViaFacet.ProtocolBased<V>
- java.lang.Object
-
- net.kyori.adventure.platform.facet.FacetBase<V>
-
- net.kyori.adventure.platform.viaversion.ViaFacet<V>
-
- net.kyori.adventure.platform.viaversion.ViaFacet.ProtocolBased<V>
-
- All Implemented Interfaces:
Facet<V>,Facet.Message<V,java.lang.String>
- Direct Known Subclasses:
ViaFacet.ActionBarTitle,ViaFacet.BossBar,ViaFacet.Chat,ViaFacet.Title
public static class ViaFacet.ProtocolBased<V> extends ViaFacet<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.Title<V>
-
Nested classes/interfaces inherited from interface net.kyori.adventure.platform.facet.Facet
Facet.Book<V,M,B>, Facet.BossBarEntity<V,P>, Facet.BossBarPacket<V>, Facet.ChatPacket<V,M>, Facet.FakeEntity<V,P>, Facet.Message<V,M>, Facet.Position<V,P>, Facet.Sound<V,P>, Facet.TitlePacket<V,M,T>
-
-
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 protectedProtocolBased(@NonNull java.lang.String fromProtocol, @NonNull java.lang.String toProtocol, int minProtocol, @NonNull java.lang.String packetName, @NonNull java.lang.Class<? extends V> viewerClass, @NonNull java.util.function.Function<V,us.myles.ViaVersion.api.data.UserConnection> connectionFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description us.myles.ViaVersion.api.PacketWrappercreatePacket(@NonNull V viewer)booleanisSupported()Gets whether this handler is supported by the current runtime.voidsendPacket(@NonNull us.myles.ViaVersion.api.PacketWrapper packet)-
Methods inherited from class net.kyori.adventure.platform.viaversion.ViaFacet
createMessage, findConnection, findProtocol, isApplicable
-
-
-
-
Constructor Detail
-
ProtocolBased
protected ProtocolBased(@NonNull java.lang.String fromProtocol, @NonNull java.lang.String toProtocol, int minProtocol, @NonNull java.lang.String packetName, @NonNull java.lang.Class<? extends V> viewerClass, @NonNull java.util.function.Function<V,us.myles.ViaVersion.api.data.UserConnection> connectionFunction)
-
-
Method Detail
-
isSupported
public boolean isSupported()
Description copied from interface:FacetGets whether this handler is supported by the current runtime.If not, this can be discarded since it will fail for all viewers.
- Specified by:
isSupportedin interfaceFacet<V>- Overrides:
isSupportedin classViaFacet<V>- Returns:
- if this handler is supported
-
createPacket
public us.myles.ViaVersion.api.PacketWrapper createPacket(@NonNull V viewer)
-
sendPacket
public void sendPacket(@NonNull us.myles.ViaVersion.api.PacketWrapper packet)
-
-