Interface Facet.Title<V,M,T>
-
- Type Parameters:
V- a viewer typeM- a message typeT- a title type
- All Superinterfaces:
Facet<V>,Facet.Message<V,M>
- All Known Subinterfaces:
Facet.TitlePacket<V,M,T>
- All Known Implementing Classes:
ViaFacet.Title
public static interface Facet.Title<V,M,T> extends Facet.Message<V,M>
A facet that shows, clears, and resets titles.
-
-
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.FakeEntity<V,P>, Facet.Message<V,M>, Facet.Position<V,P>, Facet.Sound<V,P>, Facet.Title<V,M,T>, Facet.TitlePacket<V,M,T>
-
-
Field Summary
Fields Modifier and Type Field Description static intPROTOCOL_ACTION_BAR-
Fields inherited from interface net.kyori.adventure.platform.facet.Facet.Message
PROTOCOL_HEX_COLOR, PROTOCOL_JSON
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclearTitle(@NonNull V viewer)Clears a title.@Nullable TcreateTitle(@Nullable M title, @Nullable M subTitle, int inTicks, int stayTicks, int outTicks)Creates a title.voidresetTitle(@NonNull V viewer)Resets a title.voidshowTitle(@NonNull V viewer, @NonNull T title)Shows a title.default inttoTicks(@Nullable java.time.Duration duration)Gets the ticks for a duration.-
Methods inherited from interface net.kyori.adventure.platform.facet.Facet
isApplicable, isSupported
-
Methods inherited from interface net.kyori.adventure.platform.facet.Facet.Message
createMessage
-
-
-
-
Field Detail
-
PROTOCOL_ACTION_BAR
static final int PROTOCOL_ACTION_BAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
createTitle
@Nullable T createTitle(@Nullable M title, @Nullable M subTitle, int inTicks, int stayTicks, int outTicks)
Creates a title.- Parameters:
title- a title ornullif emptysubTitle- a subtitle ornullif emptyinTicks- number of fade in ticksstayTicks- number of stay ticksoutTicks- number of fade out ticks- Returns:
- a title or
null
-
showTitle
void showTitle(@NonNull V viewer, @NonNull T title)
Shows a title.- Parameters:
viewer- a viewertitle- a title
-
clearTitle
void clearTitle(@NonNull V viewer)
Clears a title.- Parameters:
viewer- a viewer
-
resetTitle
void resetTitle(@NonNull V viewer)
Resets a title.- Parameters:
viewer- a viewer
-
toTicks
default int toTicks(@Nullable java.time.Duration duration)
Gets the ticks for a duration.- Parameters:
duration- a duration- Returns:
- the ticks
-
-