mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-06 05:17:05 +02:00
Add color utility method
This commit is contained in:
@@ -28,7 +28,10 @@ import java.util.Arrays;
|
|||||||
public class Msg {
|
public class Msg {
|
||||||
|
|
||||||
public static void msg(CommandSender s, String... msg) {
|
public static void msg(CommandSender s, String... msg) {
|
||||||
Arrays.stream(msg).forEach(text -> s.sendMessage(ChatColor.translateAlternateColorCodes('&', text)));
|
Arrays.stream(msg).forEach(text -> s.sendMessage(color(text)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String color(String text) {
|
||||||
|
return ChatColor.translateAlternateColorCodes('&', text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user