gpt4 book ai didi

com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication.getAvailableProfiles()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 14:38:31 26 4
gpt4 key购买 nike

本文整理了Java中com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication.getAvailableProfiles()方法的一些代码示例,展示了YggdrasilUserAuthentication.getAvailableProfiles()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YggdrasilUserAuthentication.getAvailableProfiles()方法的具体详情如下:
包路径:com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication
类名称:YggdrasilUserAuthentication
方法名:getAvailableProfiles

YggdrasilUserAuthentication.getAvailableProfiles介绍

暂无

代码示例

代码示例来源:origin: Slowpoke101/FTBLaunch

public static String toString (YggdrasilUserAuthentication y) {
  return "YggdrasilAuthenticationService{profiles=" + Arrays.toString(y.getAvailableProfiles()) + ", selectedProfile=" + y.getSelectedProfile() + ", isLoggedIn=" + y.isLoggedIn() + ", userType="
      + y.getUserType() + ", canPlayOnline=" + y.canPlayOnline() + "}";
}

代码示例来源:origin: ATLauncher/ATLauncher

public boolean isValidAuth() {
  if (!this.hasAuth()) {
    return false;
  }
  if (!this.auth.isLoggedIn()) {
    this.setErrorMessage("Response from Mojang wasn't valid!");
  } else if (this.auth.getAuthenticatedToken() == null) {
    this.setErrorMessage("No authentication token returned from Mojang!");
  } else if (auth.getSelectedProfile() == null && (this.auth.getAvailableProfiles() == null || this.auth
      .getAvailableProfiles().length == 0)) {
    this.setErrorMessage("There are no paid copies of Minecraft associated with this account!");
  } else if (this.auth.getSelectedProfile() == null) {
    this.setErrorMessage("No profile selected!");
  }
  return !this.hasError;
}

代码示例来源:origin: Slowpoke101/FTBLaunch

} else if (authentication.getSelectedProfile() == null && (authentication.getAvailableProfiles() != null && authentication.getAvailableProfiles().length != 0)) {
  for (GameProfile profile : authentication.getAvailableProfiles()) {
    if (selectedProfileName.equals(profile.getName())) {
      Logger.logInfo("Selected profile: " + profile.getName());
    selectedProfile = authentication.getAvailableProfiles()[0];
  return new LoginResponse(Integer.toString(authentication.getAgent().getVersion()), "token", selectedProfile.getName(), authentication.getAuthenticatedToken(),
      selectedProfile.getId().toString(), authentication);
} else if (authentication.getSelectedProfile() == null && (authentication.getAvailableProfiles() != null && authentication.getAvailableProfiles().length == 0)) {

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com