@EventHandler
    public void beforeCommandProcessing(PlayerCommandPreprocessEvent ev) {

        tocommand = plugin.getConfiguration().getStringList("cedit.tocommand");
        fromcommand = plugin.getConfiguration().getStringList("cedit.fromcommand");

        String input = ev.getMessage();

        for (int i = 0; i < tocommand.size(); i++) {
            if (input.equalsIgnoreCase("/" + tocommand.get(i))) {


                if (fromcommand.size() == tocommand.size()) {

                    Player player = ev.getPlayer();
                    if (fromcommand.get(i).contains("&")) {
                        String[] commands = fromcommand.get(i).split("&");
                        for (int j = 0; j < commands.length; j++) {
                            if (!commands[j].isEmpty() && !commands[j].equalsIgnoreCase("")) {
                                Bukkit.dispatchCommand(player, commands[j]);
                            }
                        }
                    } else {
                        Bukkit.dispatchCommand(player, fromcommand.get(i));
                    }
                    ev.setCancelled(true);
                    return;
                } else if (fromcommand.size() > tocommand.size()) {
                    plugin.getLogger().info("Fromcommand's list is bigger than tocommand's list! Check your config file to make sure everything is okay."
                            + "You possibly mapped to-commands to the wrong from-command or vice-versa.");
                    return;
                } else if (fromcommand.size() < tocommand.size()) {
                    plugin.getLogger().info("Fromcommand's list is smaller than tocommand's list! chack your config file to make sure everything is okay."
                            + "You possibly mapped to-commands to the wrong from-command or vice-versa.");
                    return;
                }
            }
        }
    }