Class TitleMessage
java.lang.Object
net.glowstone.net.message.play.game.TitleMessage
- All Implemented Interfaces:
com.flowpowered.network.Message
Documented at http://wiki.vg/Protocol#Title
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTitleMessage
(TitleMessage.Action action) Creates an instance with no message or times.TitleMessage
(TitleMessage.Action action, int fadeIn, int stay, int fadeOut) Creates an instance with times.TitleMessage
(TitleMessage.Action action, TextMessage text) Creates an instance with a message. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static TitleMessage[]
fromTitle
(com.destroystokyo.paper.Title title) Converts aTitle
to 3 instances ofTitleMessage
.int
int
int
getStay()
getText()
int
hashCode()
toString()
-
Constructor Details
-
TitleMessage
Creates an instance with a message.- Parameters:
action
- should beTitleMessage.Action.TITLE
,TitleMessage.Action.SUBTITLE
orTitleMessage.Action.ACTION
text
- the new text
-
TitleMessage
Creates an instance with times.- Parameters:
action
- should beTitleMessage.Action.TIMES
fadeIn
- the fade-in duration in ticksstay
- the delay between the end of fade-in and the start of fade-out, in ticksfadeOut
- the fade-out duration in ticks
-
TitleMessage
Creates an instance with no message or times.- Parameters:
action
- should beTitleMessage.Action.CLEAR
orTitleMessage.Action.RESET
-
-
Method Details
-
fromTitle
Converts aTitle
to 3 instances ofTitleMessage
.- Parameters:
title
- the title to convert- Returns:
- 3 messages: the first sets the title, the second sets the subtitle, and the third sets the fade/stay/fade durations
-
getAction
-
getText
-
getFadeIn
public int getFadeIn() -
getStay
public int getStay() -
getFadeOut
public int getFadeOut() -
equals
-
hashCode
public int hashCode() -
toString
-