public static Rarity fromString(String s) throws IOException {
		if (s.equalsIgnoreCase("basic")) {
			return BASIC;
		} else if (s.equalsIgnoreCase("fine")) {
			return FINE;
		} else if (s.equalsIgnoreCase("masterwork")) {
			return MASTERWORK;
		} else if (s.equalsIgnoreCase("rare")) {
			return RARE;
		} else if (s.equalsIgnoreCase("exotic")) {
			return EXOTIC;
		} else if (s.equalsIgnoreCase("ascended")) {
			return ASCENDED;
		} else if (s.equalsIgnoreCase("legendary")) {
			return LEGENDARY;
		} else {
			throw new IOException();
		}
	}