mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Pass authentication errors to disconnect.
This commit is contained in:
parent
d29c5f3418
commit
2ed6e1e1e8
1 changed files with 3 additions and 3 deletions
|
@ -58,13 +58,13 @@ public class ClientListener extends SessionAdapter {
|
||||||
try {
|
try {
|
||||||
new SessionService(proxy).joinServer(profile, accessToken, serverHash);
|
new SessionService(proxy).joinServer(profile, accessToken, serverHash);
|
||||||
} catch(AuthenticationUnavailableException e) {
|
} catch(AuthenticationUnavailableException e) {
|
||||||
event.getSession().disconnect("Login failed: Authentication service unavailable.");
|
event.getSession().disconnect("Login failed: Authentication service unavailable.", e);
|
||||||
return;
|
return;
|
||||||
} catch(InvalidCredentialsException e) {
|
} catch(InvalidCredentialsException e) {
|
||||||
event.getSession().disconnect("Login failed: Invalid login session.");
|
event.getSession().disconnect("Login failed: Invalid login session.", e);
|
||||||
return;
|
return;
|
||||||
} catch(AuthenticationException e) {
|
} catch(AuthenticationException e) {
|
||||||
event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage());
|
event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage(), e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue