List of usage examples for net.minecraftforge.common UsernameCache getMap
public static Map<UUID, String> getMap()
From source file:buildcraftAdditions.utils.PlayerUtils.java
License:GNU General Public License
public static UUID getPlayerUUID(String name) { if (name != null && !name.isEmpty()) { for (Map.Entry<UUID, String> entry : UsernameCache.getMap().entrySet()) if (entry != null && entry.getValue() != null && entry.getValue().equalsIgnoreCase(name)) return entry.getKey(); }//from w w w . ja va 2 s .co m return null; }