Package net.gcnt.additionsplus.api.utils
Interface Message
public interface Message
The message class used for processing messages from the config and sending them as chat or title messages.
-
Method Summary
Modifier and TypeMethodDescriptioncolors
(boolean parse) Set whether colors codes should be parsed when sending this message.placeholderOwner
(org.bukkit.entity.Player owner) Set the player for whom the placeholders should be parsed.placeholders
(boolean parse) Set whether placeholders should be parsed.Replace a part of the message with something else.void
send
(org.bukkit.command.CommandSender... senders) Send this message in the chat.void
sendTitle
(int in, int stay, int out, org.bukkit.entity.Player... players) Send this message as a title.void
sendTitle
(org.bukkit.entity.Player... players) Send this message as a title.
-
Method Details
-
colors
Set whether colors codes should be parsed when sending this message.- Parameters:
parse
- Whether color codes should be parsed.- Returns:
- The current
Message
.
-
replace
Replace a part of the message with something else. -
send
void send(org.bukkit.command.CommandSender... senders) Send this message in the chat.- Parameters:
senders
- List of command senders to send the message to.
-
sendTitle
void sendTitle(org.bukkit.entity.Player... players) Send this message as a title.- Parameters:
players
- A list of players to send the title to.
-
placeholders
Set whether placeholders should be parsed.- Parameters:
parse
- Whether placeholders should be parsed.- Returns:
- Current
Message
.
-
placeholderOwner
Set the player for whom the placeholders should be parsed. Set this to null to keep the players you're sending the message to.- Parameters:
owner
- The player for whom the placeholders should be parsed.- Returns:
- Current
Message
.
-
sendTitle
void sendTitle(int in, int stay, int out, org.bukkit.entity.Player... players) Send this message as a title.- Parameters:
in
- The fade-in time in ticks.stay
- The stay time in ticks.out
- The fade-out time in ticks.players
- A list of players to send the title to.
-