@Override
    public void exec(CommandSender sender, String commandName, String[] args, Player player, boolean isPlayer) {
        String broadcastMessage = "";
        String broadcastStaffTag = "";
        String broadcastRegularTag = "";

        if (!isPlayer) {
            sender.sendMessage(ChatColor.RED + "Run this command from ingame.");
            return;
        }

        if (!player.hasPermission("mymessages.staffbroadcast")) {
            player.sendMessage(ChatColor.RED + "Access denied.");
            return;
        }

        if (args.length < 1) {
            player.sendMessage(ChatColor.RED + "Usage: /" + commandName + " <message>");
            return;
        }

        broadcastMessage += this.plugin.combineSplit(0, args, " ");
        broadcastMessage = this.plugin.format(broadcastMessage);

        broadcastStaffTag += this.plugin.getConfig().getString("broadcast.staff_tag");
        broadcastStaffTag = this.plugin.format(broadcastStaffTag, player.getDisplayName());

        broadcastRegularTag += this.plugin.getConfig().getString("broadcast.regular_tag");
        broadcastRegularTag = this.plugin.format(broadcastRegularTag, player.getDisplayName());

        if (broadcastMessage != null && broadcastStaffTag != null && broadcastRegularTag != null) {
            for (Player plr : this.plugin.getServer().getOnlinePlayers()) {
                if (plr.hasPermission("mymessages.broadcast.staff")) {
                    plr.sendMessage(broadcastStaffTag + ChatColor.RESET + " " + broadcastMessage);
                } else {
                    plr.sendMessage(broadcastRegularTag + ChatColor.RESET + " " + broadcastMessage);
                }
            }
        } else {
            player.sendMessage(ChatColor.RED + "Error: Could not broadcast message.");
        }

    }