修改:     HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/SkinmeAuthenticator.java
	修改:     HMCLAPI/src/main/resources/org/jackhuang/hellominecraft/launcher/I18N.properties
	修改:     HMCLAPI/src/main/resources/org/jackhuang/hellominecraft/launcher/I18N_zh_CN.properties
	修改:     README.md
This commit is contained in:
huanghongxun 2015-12-17 18:13:30 +08:00
commit d3372e6a60
4 changed files with 52 additions and 53 deletions

View File

@ -18,7 +18,6 @@
package org.jackhuang.hellominecraft.launcher.utils.auth; package org.jackhuang.hellominecraft.launcher.utils.auth;
import org.jackhuang.hellominecraft.C; import org.jackhuang.hellominecraft.C;
import org.jackhuang.hellominecraft.HMCLog;
import org.jackhuang.hellominecraft.utils.code.DigestUtils; import org.jackhuang.hellominecraft.utils.code.DigestUtils;
import org.jackhuang.hellominecraft.utils.NetUtils; import org.jackhuang.hellominecraft.utils.NetUtils;
import org.jackhuang.hellominecraft.views.Selector; import org.jackhuang.hellominecraft.views.Selector;
@ -45,9 +44,8 @@ public final class SkinmeAuthenticator extends IAuthenticator {
@Override @Override
public UserProfileProvider login(LoginInfo info) throws AuthenticationException { public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
UserProfileProvider req = new UserProfileProvider(); UserProfileProvider req = new UserProfileProvider();
if (info.username == null || !info.username.contains("@")) { if (info.username == null || !info.username.contains("@"))
throw new AuthenticationException(C.i18n("login.not_email")); throw new AuthenticationException(C.i18n("login.not_email"));
}
try { try {
String usr = info.username.toLowerCase(); String usr = info.username.toLowerCase();
String pwd = info.password; String pwd = info.password;
@ -83,9 +81,9 @@ public final class SkinmeAuthenticator extends IAuthenticator {
} }
Selector s = new Selector(null, user, C.i18n("login.choose_charactor")); Selector s = new Selector(null, user, C.i18n("login.choose_charactor"));
s.setVisible(true); s.setVisible(true);
if (s.sel == Selector.failedToSel) { if (s.sel == Selector.FAILED_TO_SELECT)
throw new AuthenticationException(C.i18n("message.cancelled")); throw new AuthenticationException(C.i18n("message.cancelled"));
} else { else {
int index = s.sel; int index = s.sel;
String character = $char[index]; String character = $char[index];
sl = getCharacter(usr, hashCode, character).split(":"); sl = getCharacter(usr, hashCode, character).split(":");

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
# Hello Minecraft! Launcher. # Hello Minecraft! Launcher.
# Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com> # Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
# #

View File

@ -1,6 +1,6 @@
# Hello Minecraft! Launcher # Hello Minecraft! Launcher
Hello Minecraft! Launcher is a Minecraft launcher. Hello Minecraft! Launcher is a Minecraft launcher.
License is GPL v3, see http://www.gnu.org/licenses/. License is GPL v3, see http://www.gnu.org/licenses/gpl.html
### Joining ### Joining
If you really want to join the development, here's some requests. If you really want to join the development, here's some requests.