Java 类net.minecraft.util.com.mojang.authlib.Agent 实例源码

项目:CraftBukkit    文件:NameReferencingFileConverter.java   
private static void a(MinecraftServer minecraftserver, Collection collection, ProfileLookupCallback profilelookupcallback) {
    String[] astring = (String[]) Iterators.toArray(Iterators.filter(collection.iterator(), new PredicateEmptyList()), String.class);

    if (minecraftserver.getOnlineMode()) {
        minecraftserver.getGameProfileRepository().findProfilesByNames(astring, Agent.MINECRAFT, profilelookupcallback);
    } else {
        String[] astring1 = astring;
        int i = astring.length;

        for (int j = 0; j < i; ++j) {
            String s = astring1[j];
            UUID uuid = EntityHuman.a(new GameProfile((UUID) null, s));
            GameProfile gameprofile = new GameProfile(uuid, s);

            profilelookupcallback.onProfileLookupSucceeded(gameprofile);
        }
    }
}
项目:Tweakkit-Server    文件:NameReferencingFileConverter.java   
private static void a(MinecraftServer minecraftserver, Collection collection, ProfileLookupCallback profilelookupcallback) {
    String[] astring = (String[]) Iterators.toArray(Iterators.filter(collection.iterator(), new PredicateEmptyList()), String.class);

    if (minecraftserver.getOnlineMode() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
        minecraftserver.getGameProfileRepository().findProfilesByNames(astring, Agent.MINECRAFT, profilelookupcallback);
    } else {
        String[] astring1 = astring;
        int i = astring.length;

        for (int j = 0; j < i; ++j) {
            String s = astring1[j];
            UUID uuid = EntityHuman.a(new GameProfile((UUID) null, s));
            GameProfile gameprofile = new GameProfile(uuid, s);

            profilelookupcallback.onProfileLookupSucceeded(gameprofile);
        }
    }
}
项目:Tweakkit-Server    文件:UserCache.java   
private static GameProfile a(MinecraftServer minecraftserver, String s) {
    GameProfile[] agameprofile = new GameProfile[1];
    GameProfileLookup gameprofilelookup = new GameProfileLookup(agameprofile);

    minecraftserver.getGameProfileRepository().findProfilesByNames(new String[] { s}, Agent.MINECRAFT, gameprofilelookup);
    if (!minecraftserver.getOnlineMode() && agameprofile[0] == null) {
        UUID uuid = EntityHuman.a(new GameProfile((UUID) null, s));
        GameProfile gameprofile = new GameProfile(uuid, s);

        gameprofilelookup.onProfileLookupSucceeded(gameprofile);
    }

    return agameprofile[0];
}