package org.diorite.impl.command.defaults;

import java.util.Objects;
import java.util.regex.Pattern;

import org.diorite.chat.ChatColor;
import org.diorite.impl.command.SystemCommandImpl;
import org.diorite.chat.ChatPosition;
import org.diorite.command.CommandPriority;

public class BroadcastCmd extends SystemCommandImpl
{
    public BroadcastCmd()
    {
        super("broadcast", Pattern.compile("(b(road|)c(ast|))(:(?<type>[a-z0-9]+)|)", Pattern.CASE_INSENSITIVE), CommandPriority.LOW);
        this.setCommandExecutor((sender, command, label, matchedPattern, args) -> {
            ChatPosition chatPosition;
            try
            {
                chatPosition = ChatPosition.getByEnumName(matchedPattern.group("type"));
                if (chatPosition == null)
                {
                    chatPosition = ChatPosition.CHAT;
                }
            } catch (IllegalStateException | IllegalArgumentException e)
            {
                chatPosition = ChatPosition.CHAT;
            }
            if (Objects.equals(chatPosition, ChatPosition.ACTION))
            {
                sender.getServer().sendConsoleSimpleColoredMessage(args.asText());
            }
            sender.getServer().broadcastSimpleColoredMessage(chatPosition, "&7[&3Server&7] &f" + args.asText());
        });
    }
}

@@ -1267,30 +1267,8 @@
 ion,
- %22&7%5B&3Server&7%5D &f%22 +
  arg

Update BroadcastCmd.java