* @param client
	 */
	private void cmd_questedit(final String arg, final Client client) {
		final Player player = getPlayer(client);
		final String old_status = player.getStatus();

		player.setStatus(Constants.ST_EDIT);
		player.setEditor(Editors.QUEST);

		EditorData newEDD = new EditorData();

		Quest quest = null;
		boolean exist = false;

		if (arg.equals("new")) {
			// the below uses a form of the constructor that doesn't assign an id
			quest = new Quest("New Quest", "A new, blank quest.");

			// add new quest to global table
			// quests.add( quest );

			exist = true;
		}
		else {
			// TODO if I could avoid calling the exact same code each time here,
			// that would be best. should I be calling abortEditor?
			
			// TODO work on improving this code.. (quest edit)
			int id = Utils.toInt(arg, -1); // catchs the number format exception
			
			try {
				quest = getQuest(id);
			}
			catch(final IndexOutOfBoundsException ioobe) {
				// invalid quest id/list index, cannot edit (abort)
				System.out.println("--- Stack Trace ---");
				ioobe.printStackTrace();

				// reset player, and clear edit flag and editor setting
				player.setStatus(old_status);
				player.setEditor(Editors.NONE);

				// clear editor data
				player.setEditorData(null);

				send("Game> Quest Editor - Unexpected error caused abort (bounds exception)", client);
			}

			if (quest != null) {
				exist = true;
			}
		}

		// quest exists
		if (exist) {
			if (quest.Edit_Ok) {
				quest.Edit_Ok = false;
			}
			else {
				// quest is not editable, exit the editor
				abortEditor("Game> Quest Editor - Error: quest not editable (!Edit_Ok)", old_status, client);
				return;
			}

			// record prior player status
			newEDD.addObject("pstatus", old_status);

			// add quest and it's constituent parts to the editor data
			newEDD.addObject("quest", quest);
			newEDD.addObject("name", quest.getName());
			newEDD.addObject("location", -1);
			newEDD.addObject("desc", "");

			player.setEditorData(newEDD);
		}
		else {
			// quest doesn't exist (abort) reset player, and clear edit flag and editor setting

			player.setStatus(old_status);
			player.setEditor(Editors.NONE);

			// clear editor data
			player.setEditorData(null);

			send("Game> Quest Editor - Error: quest does not exist", client);

			return;
		}

		// show the current state of the quest
		op_questedit("show", client);
	}