Class FacetBase<V>
java.lang.Object
net.kyori.adventure.platform.facet.FacetBase<V>
- Type Parameters:
V
- the viewer type
- All Implemented Interfaces:
Facet<V>
A base implementation of a facet that validates viewer type.
This is not supported API. Subject to change at any time.
- Since:
- 4.0.0
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isApplicable
(V viewer) Gets whether this handler is applicable to a particular viewer.boolean
Gets whether this handler is supported by the current runtime.
-
Field Details
-
viewerClass
-
-
Constructor Details
-
FacetBase
-
-
Method Details
-
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
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
-