Class FacetBase<V>
- java.lang.Object
-
- net.kyori.adventure.platform.facet.FacetBase<V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.kyori.adventure.platform.facet.Facet
Facet.ActionBar<V,M>, Facet.Book<V,M,B>, Facet.BossBar<V>, Facet.BossBarEntity<V,P>, Facet.BossBarPacket<V>, Facet.Chat<V,M>, Facet.ChatPacket<V,M>, Facet.EntitySound<V,M>, Facet.FakeEntity<V,P>, Facet.Message<V,M>, Facet.Pointers<V>, Facet.Position<V,P>, Facet.Sound<V,P>, Facet.TabList<V,M>, Facet.Title<V,M,C,T>, Facet.TitlePacket<V,M,C,T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<? extends V>
viewerClass
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isApplicable(V viewer)
Gets whether this handler is applicable to a particular viewer.boolean
isSupported()
Gets whether this handler is supported by the current runtime.
-
-
-
Field Detail
-
viewerClass
protected final java.lang.Class<? extends V> viewerClass
-
-
Constructor Detail
-
FacetBase
protected FacetBase(@Nullable @Nullable java.lang.Class<? extends V> viewerClass)
-
-
Method Detail
-
isSupported
public boolean isSupported()
Description copied from interface:Facet
Gets whether this handler is supported by the current runtime.If not, this can be discarded since it will fail for all viewers.
- Specified by:
isSupported
in interfaceFacet<V>
- Returns:
- if this handler is supported
-
isApplicable
public boolean isApplicable(@NotNull V viewer)
Description copied from interface:Facet
Gets whether this handler is applicable to a particular viewer.This should only be invoked if
Facet.isSupported()
istrue
.- Specified by:
isApplicable
in interfaceFacet<V>
- Parameters:
viewer
- a viewer- Returns:
- if this handler is applicable to a viewer
-
-