Migrate to UUID usage

This commit is contained in:
ShadowRanger
2015-06-22 12:03:03 +10:00
parent 1ea0307156
commit e8476d5b05
122 changed files with 727 additions and 11495 deletions

View File

@@ -0,0 +1,27 @@
package com.lishid.openinv.utils;
import java.util.Arrays;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
public class UUIDUtil {
public static UUID getUUIDOf(String name) {
UUID uuid = null;
UUIDFetcher fetcher = new UUIDFetcher(Arrays.asList(name));
Map<String, UUID> response;
try {
response = fetcher.call();
uuid = response.get(name);
}
catch (Exception e) {
Bukkit.getServer().getLogger().warning("Exception while running UUIDFetcher");
e.printStackTrace();
}
return uuid;
}
}