package me.deftware.client.framework.maps;

import me.deftware.client.framework.utils.HashUtils;

import java.util.concurrent.ConcurrentHashMap;

public class EMCSkinManager {

	private static final ConcurrentHashMap<String, String> capes = new ConcurrentHashMap<>();

	public static void putCape(String name, String url, boolean hashed) {
		try {
			capes.putIfAbsent(translateUsername(name), url);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	public static String getCape(String name) throws Exception {
		return capes.getOrDefault(translateUsername(name), "");
	}

	private static String translateUsername(String username) throws Exception {
		return HashUtils.getSHA(username.toLowerCase()).toLowerCase();
	}

}

@@ -362,16 +362,46 @@
 fAbsent(
+hashed ? name.toLowerCase() : 
 translat
@@ -415,16 +415,30 @@
 me(name)
+.toLowerCase()
 , url);%0A
@@ -610,16 +610,30 @@
 me(name)
+.toLowerCase()
 , %22%22);%0A%09

Make hashes lowercase