Interface Facet.Title<V,M,C,T>
- Type Parameters:
V
- a viewer typeM
- a message typeC
- a collection typeT
- a completed title type
- All Superinterfaces:
Facet<V>
,Facet.Message<V,
M>
- All Known Subinterfaces:
Facet.TitlePacket<V,
M, C, T>
A facet that shows, clears, and resets titles.
- 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
Modifier and TypeFieldDescriptionstatic final long
static final int
Fields inherited from interface net.kyori.adventure.platform.facet.Facet.Message
PROTOCOL_HEX_COLOR, PROTOCOL_JSON
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearTitle
(V viewer) Clears a title.completeTitle
(C coll) Complete a title.void
contributeSubtitle
(C coll, M subtitle) Contribute a subtitle part to the title builder.void
contributeTimes
(C coll, int inTicks, int stayTicks, int outTicks) Contribute a times part to the title builder.void
contributeTitle
(C coll, M title) Contribute a title part to the title builder.Creates a collection that will receive title parts.void
resetTitle
(V viewer) Resets a title.void
Shows a title.default int
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 Details
-
PROTOCOL_ACTION_BAR
static final int PROTOCOL_ACTION_BAR- See Also:
-
MAX_SECONDS
static final long MAX_SECONDS- See Also:
-
-
Method Details
-
createTitleCollection
Creates a collection that will receive title parts.- Returns:
- the collection
- Since:
- 4.0.0
-
contributeTitle
Contribute a title part to the title builder.This will only be called if a title is present
- Parameters:
coll
- collectiontitle
- title text- Since:
- 4.0.0
-
contributeSubtitle
Contribute a subtitle part to the title builder.This will only be called if a subtitle is present
- Parameters:
coll
- collectionsubtitle
- subtitle text- Since:
- 4.0.0
-
contributeTimes
Contribute a times part to the title builder.This will only be called if times are present
- Parameters:
coll
- collectioninTicks
- number of fade in ticksstayTicks
- number of stay ticksoutTicks
- number of fade out ticks- Since:
- 4.0.0
-
completeTitle
Complete a title.- Parameters:
coll
- The in-progress collection of parts- Returns:
- a title or
null
- Since:
- 4.0.0
-
showTitle
Shows a title.- Parameters:
viewer
- a viewertitle
- a title- Since:
- 4.0.0
-
clearTitle
Clears a title.- Parameters:
viewer
- a viewer- Since:
- 4.0.0
-
resetTitle
Resets a title.- Parameters:
viewer
- a viewer- Since:
- 4.0.0
-
toTicks
Gets the ticks for a duration.- Parameters:
duration
- a duration- Returns:
- the ticks
- Since:
- 4.0.0
-