public static void save() {
		if (!ColorKeys.economyEnabled)
			return;

		if (CODKeys.values().size() == 0) { //If queue is empty OR economy is disabled.
			QueueFile.delete();

			return;
		}

		ColorKeys.Log(Level.INFO, "Saving COD queue...");

		try {
			if (!QueueFile.exists()) {
				if (!QueueFile.createNewFile()) {
					ColorKeys.Log(Level.SEVERE, "Error creating COD queue file.");

					return;
				}
			}

			DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
			DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
			Document doc = docBuilder.newDocument();

			Element fileVersionElement = doc.createElement("file");
			fileVersionElement.setAttribute("version", "1.1");
			doc.appendChild(fileVersionElement);

			for (String player : CODKeys.keySet()) {
				Element playerElement = doc.createElement("player");
				playerElement.setAttribute("name", player);
				fileVersionElement.appendChild(playerElement);

				for (CKKey key : CODKeys.get(player)) {
					Element keyElement = doc.createElement("key");
					keyElement.setAttribute("world", key.world.getName());
					keyElement.setAttribute("location", key.location);
					keyElement.setAttribute("color", key.color + "");
					keyElement.setAttribute("uses", key.uses + "");
					keyElement.setAttribute("initialUses", key.initialUses + "");
					keyElement.setAttribute("price", key.price + "");
					playerElement.appendChild(keyElement);
				}
			}

			TransformerFactory transfac = TransformerFactory.newInstance();
			Transformer trans = transfac.newTransformer();
			//trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
			trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
			trans.setOutputProperty(OutputKeys.INDENT, "yes");

			StreamResult result = new StreamResult(new StringWriter());
			DOMSource source = new DOMSource(doc);
			trans.transform(source, result);

			FileOutputStream OUT = new FileOutputStream(QueueFile);
			OUT.write(result.getWriter().toString().getBytes());
			OUT.flush();
			OUT.close();

			ColorKeys.Log(Level.INFO, "COD queue saved successfully.");
		}
		catch (Exception e) {
			ColorKeys.Log(Level.SEVERE, "Unknown error saving COD queue.");

			e.printStackTrace();

			return;
		}
	}