Class CyberMsgUtils
java.lang.Object
com.github.cyberryan1.cybercore.spigot.utils.CyberMsgUtils
Message sending utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Broadcasts a singular messagestatic void
Broadcasts multiple messages, each separated by a new linestatic void
Broadcasts a singular message to all online players who meet the given predicatestatic void
Broadcasts multiple messages, each separated by a new linestatic void
Broadcasts multiple messages, each separated by a new line, to all online players who meet the given predicatestatic void
sendMessage
(org.bukkit.command.CommandSender entity, String... msgs) Sends theCyberColorUtils.getColored(String...)
of a given string list to aCommandSender
static void
sendMessage
(org.bukkit.command.CommandSender entity, List<String> msgs) Sends theCyberColorUtils.getColored(String...)
of a given string list to aCommandSender
static void
Alias to thesendMessage(CommandSender, String...)
methodstatic void
Alias to thesendMessage(CommandSender, List)
method
-
Constructor Details
-
CyberMsgUtils
public CyberMsgUtils()
-
-
Method Details
-
sendMessage
Sends theCyberColorUtils.getColored(String...)
of a given string list to aCommandSender
- Parameters:
entity
- TheCommandSender
to send the message tomsgs
- The strings to color
-
sendMsg
Alias to thesendMessage(CommandSender, String...)
method- Parameters:
entity
- TheCommandSender
to send the message tomsgs
- The strings to color
-
sendMessage
Sends theCyberColorUtils.getColored(String...)
of a given string list to aCommandSender
- Parameters:
entity
- TheCommandSender
to send the message tomsgs
- The strings to color
-
sendMsg
Alias to thesendMessage(CommandSender, List)
method- Parameters:
entity
- TheCommandSender
to send the message tomsgs
- The strings to color
-
broadcast
Broadcasts a singular message- Parameters:
msg
- The message to broadcast
-
broadcast
Broadcasts multiple messages, each separated by a new line- Parameters:
msgs
- The messages to broadcast
-
broadcast
Broadcasts multiple messages, each separated by a new line- Parameters:
msgs
- The messages to broadcast
-
broadcast
Broadcasts a singular message to all online players who meet the given predicate- Parameters:
msg
- The message to broadcastpredicate
- The predicate to check against
-
broadcast
public static void broadcast(List<String> msgs, Predicate<? super org.bukkit.entity.Player> predicate) Broadcasts multiple messages, each separated by a new line, to all online players who meet the given predicate- Parameters:
msgs
- The messages to broadcastpredicate
- The predicate to check against
-