2020-02-26 22:20:13 +02:00
|
|
|
package pw.kaboom.extras.commands;
|
|
|
|
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandExecutor;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
|
|
|
public final class CommandBroadcastVanilla implements CommandExecutor {
|
2022-05-20 06:07:38 +03:00
|
|
|
public boolean onCommand(final CommandSender sender, final Command command, final String label,
|
|
|
|
final String[] args) {
|
2022-05-20 05:35:48 +03:00
|
|
|
if (args.length == 0) {
|
|
|
|
sender.sendMessage(ChatColor.RED + "Usage: /" + label + " <message ..>");
|
|
|
|
} else {
|
2022-05-20 06:07:38 +03:00
|
|
|
Command.broadcastCommandMessage(sender, ChatColor.translateAlternateColorCodes(
|
|
|
|
'&', String.join(" ", args)));
|
2022-05-20 05:35:48 +03:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2020-02-26 22:20:13 +02:00
|
|
|
}
|