@Override
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {

        String myCmd = cmd.getName().toLowerCase();
        Commands c = new Commands((Player) sender);
        boolean ret = true;

        if (myCmd.equals("pmhelp")) {
            c.Help();
        } else if (myCmd.equals("pmread")) {
            int n = 0;
            if (args.length > 0) {
                try {
                    n = Integer.parseInt(args[0]);
                } catch (Exception ex) {
                    c.Close();
                    return false;
                }
                ret = c.Read(n);
            } else {
                ret = c.Read(n);
            }
        } else if (myCmd.equals("pmsend")) {
            if (args.length >= 3) {
                List<String> msg_text = new ArrayList<String>(Arrays.asList(args));
                ret = c.Send(args[0], args[1], msg_text.subList(2, msg_text.size()));
            }
        } else if (myCmd.equals("pmlist")) {
            ret = c.List();
        }
        c.Close();
        return ret;
    }