Fixed join problem

This commit is contained in:
Deichor 2024-12-10 04:05:14 +03:00
parent 83fdc4f609
commit 9a128cd8ce
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ public class OnJoinVerifier implements Reloadable {
* @throws FailedVerificationException if the email verification is not completed
*/
public void checkKickNotVerified(boolean isAuthAvailable) throws FailedVerificationException {
if (!isAuthAvailable && settings.getProperty(RestrictionSettings.KICK_NON_REGISTERED) && settings.getProperty(RestrictionSettings.KICK_NOT_VERIFIED)) {
if (!isAuthAvailable && settings.getProperty(RestrictionSettings.KICK_NOT_VERIFIED)) {
throw new FailedVerificationException(MessageKey.MUST_VERIFIED_MESSAGE);
}
}

View File

@ -150,7 +150,7 @@ public class PlayerListener implements Listener {
// Slow, blocking checks
try {
final PlayerAuth auth = dataSource.getAuth(name);
final boolean isAuthAvailable = auth != null && auth.isEmailVerified();
final boolean isAuthAvailable = (auth != null && auth.isEmailVerified());
onJoinVerifier.checkKickNonRegistered(isAuthAvailable);
onJoinVerifier.checkKickNotVerified(isAuthAvailable);
onJoinVerifier.checkAntibot(name, isAuthAvailable);