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 TypeMethodDescriptionbooleanstatic TitleMessage[]fromTitle(com.destroystokyo.paper.Title title) Converts aTitleto 3 instances ofTitleMessage.intintintgetStay()getText()inthashCode()toString()
-
Constructor Details
-
TitleMessage
Creates an instance with a message.- Parameters:
action- should beTitleMessage.Action.TITLE,TitleMessage.Action.SUBTITLEorTitleMessage.Action.ACTIONtext- the new text
-
TitleMessage
Creates an instance with times.- Parameters:
action- should beTitleMessage.Action.TIMESfadeIn- 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.CLEARorTitleMessage.Action.RESET
-
-
Method Details
-
fromTitle
Converts aTitleto 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
-