private void spamCheck(Player player, String message, AsyncPlayerChatEvent event) {
        if (!message.equalsIgnoreCase(spamcheck)) {
            spamcheck = event.getMessage();
            spamCount = 0;
        } else {
            event.setCancelled(true);
            spamCount++;
        }
        String result = config.getString("Chat.SpamCheck.Result", "kick");
        String reason = config.getString("Chat.SpamCheck.Reason", "Spam");
        if (config.getInt("Chat.SpamCheck.Counter") < spamCount && result != null) {
            if (result.equalsIgnoreCase("ban") || result.equalsIgnoreCase("kick") || result.equalsIgnoreCase("ipban") || result.equalsIgnoreCase("jail") || result.equalsIgnoreCase("warn")) {
                String fakecmd;
                if (config.getBoolean("Chat.SpamCheck.Silent", false)) {
                    fakecmd = result + " " + player.getName() + " " + "-s" + " " + reason;
                } else {
                    fakecmd = result + " " + player.getName() + " " + reason;
                }
                plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), fakecmd);
            }
        }

    }