static private Material getType(String str) {
		// By ID
		try {
			Material mat = Material.getMaterial(Integer.parseInt(str));
			if (mat != null && mat.isBlock()) return mat;
		} catch (Exception ex) {}
		
		// By Name
		Material[] types = getTypes();
		for (int i = 0; i < types.length; i++) {
			if (types[i].name().equalsIgnoreCase(str)) return types[i];
		}
		
		for (int i = 0; i < types.length; i++) {
			if (types[i].name().replace("_", "").equalsIgnoreCase(str)) return types[i];
		}
		
		for (int i = 0; i < types.length; i++) {
			if (types[i].name().replace("_", " ").equalsIgnoreCase(str)) return types[i];
		}
		
		throw new RuntimeException("Unknown block: " + str);
	}