From 0f51b4f2a5f38e0fff698f82ae13e6f50977e2d1 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Sat, 16 Jun 2018 19:57:22 -0400 Subject: [PATCH] Added broadcast method --- .../java/me/clip/placeholderapi/util/Msg.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/util/Msg.java b/src/main/java/me/clip/placeholderapi/util/Msg.java index efa8bdc..6a2e799 100644 --- a/src/main/java/me/clip/placeholderapi/util/Msg.java +++ b/src/main/java/me/clip/placeholderapi/util/Msg.java @@ -20,18 +20,22 @@ */ 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 msg(CommandSender s, String... msg) { + Arrays.stream(msg).map(Msg::color).forEach(s::sendMessage); + } - public static String color(String text) { - return ChatColor.translateAlternateColorCodes('&', text); - } + 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); + } }