@EventHandler
    public void commands(PlayerCommandPreprocessEvent ev) { //this is the command checker
        if (ev.isCancelled()) return;
        if (ev.getPlayer().hasPermission("language.exempt")) return;
        if (!(config.commandenabled())) return;
        String[] args = ev.getMessage().replace("/", "").split(" ");
        String command = args[0];
        if (command.equalsIgnoreCase("language") || command.equalsIgnoreCase("language")) {
            // dont run any checks on it
            return;
        }
        //Same for both lag and no lagg
        List<String> swearlist = Wordcatch.isswear(ev.getMessage());
        if (swearlist != null) {
            for (String swear : swearlist) {
                ev.getPlayer().sendMessage(ChatColor.RED + "NO BADWORDS");
                // message contains a swear
                // cancel event
                ev.setCancelled(true);
            }
        }
        List<String> forbiddenlist = Wordcatch.isforbidden(ev.getMessage());
        if (forbiddenlist != null) {
            for (String forbidden : forbiddenlist) {
                Integer id = config.getWords().indexOf(forbidden);
                ev.getPlayer().sendMessage(config.getMessage(id));
                String player = ev.getPlayer().getName().replace("]", "");
                String playerconf = "<player>";
                String commandplay = config.getCommand(id).replaceAll(playerconf, player).replace("]", "");
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), commandplay);
                ev.getPlayer().sendMessage(config.getMessage(id));
                ev.setCancelled(true);
            }
        }
    }