// Path: src/main/java/p455w0rdslib/LibGlobals.java
// public class LibGlobals {
// 	public static final String MODID = "p455w0rdslib";
// 	public static final String VERSION = "1.0.35";
// 	public static final String NAME = "p455w0rd's Library";
// 	public static final String SERVER_PROXY = "p455w0rdslib.proxy.CommonProxy";
// 	public static final String CLIENT_PROXY = "p455w0rdslib.proxy.ClientProxy";
// 	public static final String DEPENDENCIES = "after:mantle;after:tconstruct;after:enderio;after:ProjectE;after:tesla";
// 	public static final String CONFIG_FILE = "config/p455w0rdsLib.cfg";
// 	public static final ExecutorService THREAD_POOL = new ThreadPoolExecutor(0, 2, 1, TimeUnit.MINUTES, new LinkedBlockingQueue<Runnable>());
// 	public static int ELAPSED_TICKS = 0;
// 	public static boolean IS_CONTRIBUTOR = false;
// 	public static boolean CONTRIBUTOR_FILE_DOWNLOADED = false;
// 
// 	public static class ConfigOptions {
// 		public static boolean ENABLE_CONTRIB_CAPE = true;
// 	}
// }
// 
// Path: src/main/java/p455w0rdslib/LibRegistry.java
// public class LibRegistry {
// 
// 	private static Map<UUID, String> NAME_REGISTRY = Maps.newHashMap();
// 	private static Map<String, UUID> UUID_REGISTRY = Maps.newHashMap();
// 	private static Map<String, ItemStack> SKULL_REGISTRY = Maps.newHashMap();
// 
// 	public static Map<String, ItemStack> getSkullRegistry() {
// 		return SKULL_REGISTRY;
// 	}
// 
// 	public static Map<UUID, String> getNameRegistry() {
// 		return NAME_REGISTRY;
// 	}
// 
// 	public static Map<String, UUID> getUUIDRegistry() {
// 		return UUID_REGISTRY;
// 	}
// 
// 	public static String getPlayerName(UUID uuid) {
// 		return NAME_REGISTRY.get(uuid);
// 	}
// 
// 	public static boolean registerName(UUID uuid, String name) {
// 		boolean hasChanged = false;
// 		if (!NAME_REGISTRY.containsKey(uuid)) {
// 			NAME_REGISTRY.put(uuid, name);
// 			hasChanged = true;
// 		}
// 		if (!UUID_REGISTRY.containsKey(name)) {
// 			UUID_REGISTRY.put(name, uuid);
// 		}
// 		return hasChanged;
// 	}
// 
// 	public static void registerUUID(String name, UUID uuid) {
// 		registerName(uuid, name);
// 	}
// 
// 	public static void clearNameRegistry() {
// 		NAME_REGISTRY = new HashMap<UUID, String>();
// 		UUID_REGISTRY = new HashMap<String, UUID>();
// 	}
// }


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import com.google.common.base.CharMatcher;
import com.google.common.base.Strings;
import com.google.common.io.Resources;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import p455w0rdslib.LibGlobals;
import p455w0rdslib.LibRegistry;
package p455w0rdslib.util;




/**
 * Utility for fetching online player names and UUIDs<br>
 * Calls performed on separate thread
 *
 * @author p455w0rd
 *
 */
public class PlayerUUIDUtils {

	public static String getPlayerName(final UUID uuid) {
		String retVal = "";
		try {
			retVal = LibGlobals.THREAD_POOL.submit(() -> fetchPlayerName(uuid)).get();
		}
		catch (InterruptedException | ExecutionException e) {
		}
		return retVal;
	};

	public static UUID getPlayerUUID(final String name) {
		try {
// Path: src/main/java/p455w0rdslib/LibGlobals.java
// public class LibGlobals {
// 	public static final String MODID = "p455w0rdslib";
// 	public static final String VERSION = "1.0.35";
// 	public static final String NAME = "p455w0rd's Library";
// 	public static final String SERVER_PROXY = "p455w0rdslib.proxy.CommonProxy";
// 	public static final String CLIENT_PROXY = "p455w0rdslib.proxy.ClientProxy";
// 	public static final String DEPENDENCIES = "after:mantle;after:tconstruct;after:enderio;after:ProjectE;after:tesla";
// 	public static final String CONFIG_FILE = "config/p455w0rdsLib.cfg";
// 	public static final ExecutorService THREAD_POOL = new ThreadPoolExecutor(0, 2, 1, TimeUnit.MINUTES, new LinkedBlockingQueue<Runnable>());
// 	public static int ELAPSED_TICKS = 0;
// 	public static boolean IS_CONTRIBUTOR = false;
// 	public static boolean CONTRIBUTOR_FILE_DOWNLOADED = false;
// 
// 	public static class ConfigOptions {
// 		public static boolean ENABLE_CONTRIB_CAPE = true;
// 	}
// }
// 
// Path: src/main/java/p455w0rdslib/LibRegistry.java
// public class LibRegistry {
// 
// 	private static Map<UUID, String> NAME_REGISTRY = Maps.newHashMap();
// 	private static Map<String, UUID> UUID_REGISTRY = Maps.newHashMap();
// 	private static Map<String, ItemStack> SKULL_REGISTRY = Maps.newHashMap();
// 
// 	public static Map<String, ItemStack> getSkullRegistry() {
// 		return SKULL_REGISTRY;
// 	}
// 
// 	public static Map<UUID, String> getNameRegistry() {
// 		return NAME_REGISTRY;
// 	}
// 
// 	public static Map<String, UUID> getUUIDRegistry() {
// 		return UUID_REGISTRY;
// 	}
// 
// 	public static String getPlayerName(UUID uuid) {
// 		return NAME_REGISTRY.get(uuid);
// 	}
// 
// 	public static boolean registerName(UUID uuid, String name) {
// 		boolean hasChanged = false;
// 		if (!NAME_REGISTRY.containsKey(uuid)) {
// 			NAME_REGISTRY.put(uuid, name);
// 			hasChanged = true;
// 		}
// 		if (!UUID_REGISTRY.containsKey(name)) {
// 			UUID_REGISTRY.put(name, uuid);
// 		}
// 		return hasChanged;
// 	}
// 
// 	public static void registerUUID(String name, UUID uuid) {
// 		registerName(uuid, name);
// 	}
// 
// 	public static void clearNameRegistry() {
// 		NAME_REGISTRY = new HashMap<UUID, String>();
// 		UUID_REGISTRY = new HashMap<String, UUID>();
// 	}
// }


// Path: src/main/java/p455w0rdslib/util/PlayerUUIDUtils.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import com.google.common.base.CharMatcher;
import com.google.common.base.Strings;
import com.google.common.io.Resources;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import p455w0rdslib.LibGlobals;
import p455w0rdslib.LibRegistry;

package p455w0rdslib.util;




/**
 * Utility for fetching online player names and UUIDs<br>
 * Calls performed on separate thread
 *
 * @author p455w0rd
 *
 */
public class PlayerUUIDUtils {

	public static String getPlayerName(final UUID uuid) {
		String retVal = "";
		try {
			retVal = LibGlobals.THREAD_POOL.submit(() -> fetchPlayerName(uuid)).get();
		}
		catch (InterruptedException | ExecutionException e) {
		}
		return retVal;
	};

	public static UUID getPlayerUUID(final String name) {
		try {
			return LibGlobals.THREAD_POOL.submit(() -> fetchPlayerUUID(name)).get();