Removed static login method
This commit is contained in:
@@ -47,7 +47,7 @@ public class AuthlibInjectorAccount extends YggdrasilAccount {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuthInfo logIn() throws AuthenticationException {
|
||||
public synchronized AuthInfo logIn() throws AuthenticationException {
|
||||
return inject(super::logIn);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class YggdrasilAccount extends Account {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuthInfo logIn() throws AuthenticationException {
|
||||
public synchronized AuthInfo logIn() throws AuthenticationException {
|
||||
if (!canPlayOnline()) {
|
||||
if (service.validate(session.getAccessToken(), session.getClientToken())) {
|
||||
isOnline = true;
|
||||
@@ -84,7 +84,7 @@ public class YggdrasilAccount extends Account {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuthInfo logInWithPassword(String password) throws AuthenticationException {
|
||||
public synchronized AuthInfo logInWithPassword(String password) throws AuthenticationException {
|
||||
return logInWithPassword(password, new SpecificCharacterSelector(characterUUID));
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class CacheRepository {
|
||||
|
||||
public void tryCacheFile(Path path, String algorithm, String hash) throws IOException {
|
||||
Path cache = getFile(algorithm, hash);
|
||||
if (Files.exists(cache)) return;
|
||||
if (Files.isRegularFile(cache)) return;
|
||||
FileUtils.copyFile(path.toFile(), cache.toFile());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user