mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 12:51:09 -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 {
|
||||
new SessionService(proxy).joinServer(profile, accessToken, serverHash);
|
||||
} catch(AuthenticationUnavailableException e) {
|
||||
event.getSession().disconnect("Login failed: Authentication service unavailable.");
|
||||
event.getSession().disconnect("Login failed: Authentication service unavailable.", e);
|
||||
return;
|
||||
} catch(InvalidCredentialsException e) {
|
||||
event.getSession().disconnect("Login failed: Invalid login session.");
|
||||
event.getSession().disconnect("Login failed: Invalid login session.", e);
|
||||
return;
|
||||
} catch(AuthenticationException e) {
|
||||
event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage());
|
||||
event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage(), e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue