public static interface MessagesService.Builder
IMessageComponent
sModifier and Type | Method and Description |
---|---|
boolean |
addActionBar(java.lang.String message)
Add an action bar text to the message component.
|
boolean |
addBossBar(java.lang.String message,
BossBar.Color color,
int ticks)
Add boss bar to the message component.
|
boolean |
addComplexMessage(net.md_5.bungee.api.chat.TextComponent textComponent)
Add a complex message to the message component.
|
boolean |
addMessageComponent(IMessageComponent messageComponent)
Add another message component to the message component.
|
boolean |
addRawMessage(java.lang.String message)
Add a raw message to the message component.
|
boolean |
addSound(org.bukkit.Sound sound,
float volume,
float pitch)
Add a sound to the message component.
|
boolean |
addTitle(java.lang.String titleMessage,
java.lang.String subtitleMessage,
int fadeIn,
int duration,
int fadeOut)
Add a title to the message component.
|
IMessageComponent |
build()
Build a new message component from the given builder.
|
boolean addActionBar(@Nullable java.lang.String message)
message
- The action bar text.boolean addBossBar(@Nullable java.lang.String message, BossBar.Color color, int ticks)
message
- The text to be displayed in the boss barcolor
- The color of the boss barticks
- The duration of the boss bar, in ticks.boolean addComplexMessage(@Nullable net.md_5.bungee.api.chat.TextComponent textComponent)
textComponent
- The text component.boolean addRawMessage(@Nullable java.lang.String message)
message
- The raw text.boolean addSound(org.bukkit.Sound sound, float volume, float pitch)
sound
- The sound to be played.volume
- The volume of the sound.pitch
- The pitch of the sound.boolean addTitle(@Nullable java.lang.String titleMessage, @Nullable java.lang.String subtitleMessage, int fadeIn, int duration, int fadeOut)
titleMessage
- The first line of the title.subtitleMessage
- The second line of the title.fadeIn
- The duration of the fade in animation, in ticks.duration
- The duration of the title to last, in ticks.fadeOut
- The duration of the fade out animation, in ticks.boolean addMessageComponent(IMessageComponent messageComponent)
messageComponent
- The other message component to add.IMessageComponent build()