    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = null;
        if (sender instanceof Player) {
            player = (Player) sender;
        }
        if (cmd.getName().equalsIgnoreCase("tardisprefs")) {
            if (args.length == 0) {
                return false;
            }
            if (player == null) {
                sender.sendMessage(plugin.pluginName + ChatColor.RED + " This command can only be run by a player");
                return false;
            }
            String pref = args[0].toLowerCase(Locale.ENGLISH);
            if (firstArgs.contains(pref)) {
                if (player.hasPermission("tardis.timetravel")) {
                    if (pref.equals("key")) {
                        if (args.length < 2) {
                            sender.sendMessage(plugin.pluginName + "You need to specify a key item!");
                            return false;
                        }
                        String setMaterial = args[1].toUpperCase(Locale.ENGLISH);
                        if (!Arrays.asList(TARDISMaterials.MATERIAL_LIST).contains(setMaterial)) {
                            sender.sendMessage(plugin.pluginName + ChatColor.RED + "That is not a valid Material! Try checking http://jd.bukkit.org/apidocs/org/bukkit/Material.html");
                            return false;
                        } else {
                            QueryFactory qf = new QueryFactory(plugin);
                            HashMap<String, Object> set = new HashMap<String, Object>();
                            set.put("key", setMaterial);
                            HashMap<String, Object> where = new HashMap<String, Object>();
                            where.put("player", player.getName());
                            qf.doUpdate("player_prefs", set, where);
                            sender.sendMessage(plugin.pluginName + "Key preference saved.");
                            return true;
                        }
                    }
                    if (pref.equals("wall") || pref.equals("floor")) {
                        if (args.length < 2) {
                            sender.sendMessage(plugin.pluginName + "You need to specify a " + pref + " material!");
                            return false;
                        }
                        String wall_mat;
                        if (args.length > 2) {
                            int count = args.length;
                            StringBuilder buf = new StringBuilder();
                            for (int i = 1; i < count; i++) {
                                buf.append(args[i]).append("_");
                            }
                            String tmp = buf.toString();
                            String t = tmp.substring(0, tmp.length() - 1);
                            wall_mat = t.toUpperCase(Locale.ENGLISH);
                        } else {
                            wall_mat = args[1].toUpperCase(Locale.ENGLISH);
                        }
                        TARDISWalls tw = new TARDISWalls();
                        if (!tw.blocks.containsKey(wall_mat)) {
                            String message = (wall_mat.equals("HELP")) ? "Here is a list of valid " + pref + " materials:" : "That is not a valid " + pref + " material! Try:";
                            sender.sendMessage(plugin.pluginName + message);
                            List<String> sortedKeys = new ArrayList(tw.blocks.keySet());
                            Collections.sort(sortedKeys);
                            for (String w : sortedKeys) {
                                sender.sendMessage(w);
                            }
                            return true;
                        }
                        QueryFactory qf = new QueryFactory(plugin);
                        HashMap<String, Object> set = new HashMap<String, Object>();
                        set.put(pref, wall_mat);
                        HashMap<String, Object> where = new HashMap<String, Object>();
                        where.put("player", player.getName());
                        qf.doUpdate("player_prefs", set, where);
                        sender.sendMessage(plugin.pluginName + ucfirst(pref) + " material saved.");
                        return true;
                    }
                    if (args.length < 2 || (!args[1].equalsIgnoreCase("on") && !args[1].equalsIgnoreCase("off"))) {
                        sender.sendMessage(plugin.pluginName + "You need to specify if " + pref + " should be on or off!");
                        return false;
                    }
                    HashMap<String, Object> where = new HashMap<String, Object>();
                    where.put("player", player.getName());
                    ResultSetPlayerPrefs rsp = new ResultSetPlayerPrefs(plugin, where);
                    QueryFactory qf = new QueryFactory(plugin);
                    HashMap<String, Object> set = new HashMap<String, Object>();
                    if (!rsp.resultSet()) {
                        set.put("player", player.getName());
                        qf.doInsert("player_prefs", set);
                    }
                    HashMap<String, Object> setp = new HashMap<String, Object>();
                    HashMap<String, Object> wherep = new HashMap<String, Object>();
                    wherep.put("player", player.getName());
                    String grammar = (TARDISConstants.vowels.contains(pref.substring(0, 1))) ? " was" : " were";
                    if (args[1].equalsIgnoreCase("on")) {
                        setp.put(pref + "_on", 1);
                        sender.sendMessage(plugin.pluginName + pref + grammar + " turned ON!");
                    }
                    if (args[1].equalsIgnoreCase("off")) {
                        setp.put(pref + "_on", 0);
                        sender.sendMessage(plugin.pluginName + pref + grammar + " turned OFF.");
                    }
                    qf.doUpdate("player_prefs", setp, wherep);
                    return true;
                } else {
                    sender.sendMessage(plugin.pluginName + TARDISConstants.NO_PERMS_MESSAGE);
                    return false;
                }
            }
        }
        return false;
    }

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = null;
        if (sender instanceof Player) {
            player = (Player) sender;
        }
        if (cmd.getName().equalsIgnoreCase("tardisprefs")) {
            if (args.length == 0) {
                return false;
            }
            if (player == null) {
                sender.sendMessage(plugin.pluginName + ChatColor.RED + " This command can only be run by a player");
                return false;
            }
            String pref = args[0].toLowerCase(Locale.ENGLISH);
            if (firstArgs.contains(pref)) {
                if (player.hasPermission("tardis.timetravel")) {
                    if (pref.equals("key")) {
                        if (args.length < 2) {
                            sender.sendMessage(plugin.pluginName + "You need to specify a key item!");
                            return false;
                        }
                        String setMaterial = args[1].toUpperCase(Locale.ENGLISH);
                        if (!Arrays.asList(TARDISMaterials.MATERIAL_LIST).contains(setMaterial)) {
                            sender.sendMessage(plugin.pluginName + ChatColor.RED + "That is not a valid Material! Try checking http://jd.bukkit.org/apidocs/org/bukkit/Material.html");
                            return false;
                        } else {
                            QueryFactory qf = new QueryFactory(plugin);
                            HashMap<String, Object> set = new HashMap<String, Object>();
                            set.put("key", setMaterial);
                            HashMap<String, Object> where = new HashMap<String, Object>();
                            where.put("player", player.getName());
                            qf.doUpdate("player_prefs", set, where);
                            sender.sendMessage(plugin.pluginName + "Key preference saved.");
                            return true;
                        }
                    }
                    if (pref.equals("wall") || pref.equals("floor")) {
                        if (args.length < 2) {
                            sender.sendMessage(plugin.pluginName + "You need to specify a " + pref + " material!");
                            return false;
                        }
                        String wall_mat;
                        if (args.length > 2) {
                            int count = args.length;
                            StringBuilder buf = new StringBuilder();
                            for (int i = 1; i < count; i++) {
                                buf.append(args[i]).append("_");
                            }
                            String tmp = buf.toString();
                            String t = tmp.substring(0, tmp.length() - 1);
                            wall_mat = t.toUpperCase(Locale.ENGLISH);
                        } else {
                            wall_mat = args[1].toUpperCase(Locale.ENGLISH);
                        }
                        TARDISWalls tw = new TARDISWalls();
                        if (!tw.blocks.containsKey(wall_mat)) {
                            String message = (wall_mat.equals("HELP")) ? "Here is a list of valid " + pref + " materials:" : "That is not a valid " + pref + " material! Try:";
                            sender.sendMessage(plugin.pluginName + message);
                            List<String> sortedKeys = new ArrayList(tw.blocks.keySet());
                            Collections.sort(sortedKeys);
                            for (String w : sortedKeys) {
                                sender.sendMessage(w);
                            }
                            return true;
                        }
                        QueryFactory qf = new QueryFactory(plugin);
                        HashMap<String, Object> set = new HashMap<String, Object>();
                        set.put(pref, wall_mat);
                        HashMap<String, Object> where = new HashMap<String, Object>();
                        where.put("player", player.getName());
                        qf.doUpdate("player_prefs", set, where);
                        sender.sendMessage(plugin.pluginName + ucfirst(pref) + " material saved.");
                        return true;
                    }
                    if (args.length < 2 || (!args[1].equalsIgnoreCase("on") && !args[1].equalsIgnoreCase("off"))) {
                        sender.sendMessage(plugin.pluginName + "You need to specify if " + pref + " should be on or off!");
                        return false;
                    }
                    List<String> was = Arrays.asList(new String[]{"auto", "platform"});
                    HashMap<String, Object> where = new HashMap<String, Object>();
                    where.put("player", player.getName());
                    ResultSetPlayerPrefs rsp = new ResultSetPlayerPrefs(plugin, where);
                    QueryFactory qf = new QueryFactory(plugin);
                    HashMap<String, Object> set = new HashMap<String, Object>();
                    if (!rsp.resultSet()) {
                        set.put("player", player.getName());
                        qf.doInsert("player_prefs", set);
                    }
                    HashMap<String, Object> setp = new HashMap<String, Object>();
                    HashMap<String, Object> wherep = new HashMap<String, Object>();
                    wherep.put("player", player.getName());
                    String grammar = (was.contains(pref)) ? " was" : " were";
                    if (args[1].equalsIgnoreCase("on")) {
                        setp.put(pref + "_on", 1);
                        sender.sendMessage(plugin.pluginName + pref + grammar + " turned ON!");
                    }
                    if (args[1].equalsIgnoreCase("off")) {
                        setp.put(pref + "_on", 0);
                        sender.sendMessage(plugin.pluginName + pref + grammar + " turned OFF.");
                    }
                    qf.doUpdate("player_prefs", setp, wherep);
                    return true;
                } else {
                    sender.sendMessage(plugin.pluginName + TARDISConstants.NO_PERMS_MESSAGE);
                    return false;
                }
            }
        }
        return false;
    }
