public void saveDatabase() {
		try {
			File directory = new File(getDataFolder() + File.separator
					+ "anvils");
			if (!directory.exists())
				directory.mkdirs();
			for (File file : directory.listFiles()) {
				file.delete();
			}

			for (int i = 0; i < anvils.size(); i++) {
				Location loc = (Location) anvils.keySet().toArray()[i];
				double x = loc.getBlockX();
				double y = loc.getBlockY();
				double z = loc.getBlockZ();
				String world = loc.getWorld().getUID().toString();

				Writer out = new OutputStreamWriter(new FileOutputStream(
						new File(getDataFolder() + File.separator + "anvils", x
								+ ";" + y + ";" + z + ";" + world + ".dat")),
						"UTF-8");

				Inventory inv = (anvils.get(anvils.keySet().toArray()[i]));
				for (int j = 0; j <= 8; j++) {
					if (inv.getItem(j) != null) {
						ItemStack is = inv.getItem(j);
						ItemMeta meta = is.getItemMeta();
						out.write(is.getType().name() + ":" + is.getAmount()
								+ ":" + is.getDurability() + ":"
								+ meta.getDisplayName() + ";" + "\n");
					} else {
						out.write("AIR" + ":" + "0" + ":" + "0" + ":" + "null"
								+ ";" + "\n");
					}
				}

				out.flush();
				out.close();

			}
		} catch (Exception e) {
			log(e);
		}
	}