mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Added broadcast method
This commit is contained in:
parent
287ab16d3a
commit
0f51b4f2a5
@ -20,17 +20,21 @@
|
||||
*/
|
||||
package me.clip.placeholderapi.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Msg {
|
||||
|
||||
public static void msg(CommandSender s, String... msg) {
|
||||
Arrays.stream(msg).map(Msg::color).forEach(s::sendMessage);
|
||||
}
|
||||
|
||||
public static void broadcast(String... msg) {
|
||||
Arrays.stream(msg).map(Msg::color).forEach(Bukkit::broadcastMessage);
|
||||
}
|
||||
|
||||
public static String color(String text) {
|
||||
return ChatColor.translateAlternateColorCodes('&', text);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user