更改十分钟内注册逻辑

This commit is contained in:
Sabrita 2023-02-28 13:22:15 +08:00
parent e109094472
commit bdf7816306
2 changed files with 3 additions and 5 deletions

View File

@ -180,17 +180,15 @@ public class RegisterCommand extends PlayerCommand {
@Override @Override
public void run() { public void run() {
if (dataSource.getAuth(player.getName()) != null) { if (dataSource.getAuth(player.getName()) != null) {
if (dataSource.getAuth(player.getName()).getLastLogin() == null && (dataSource.getAuth(player.getName()).getRegistrationDate() + 600000) < System.currentTimeMillis()) { if (dataSource.getAuth(player.getName()).getLastLogin() == null) {
management.performUnregisterByAdmin(null, player.getName(), player); management.performUnregisterByAdmin(null, player.getName(), player);
timer.cancel(); timer.cancel();
} else if (dataSource.getAuth(player.getName()).getLastLogin() != null) {
timer.cancel();
} }
} else { } else {
timer.cancel(); timer.cancel();
} }
} }
}, 60000, 60000); }, 600000);
} }
} }

View File

@ -57,7 +57,7 @@ unregister:
misc: misc:
account_not_activated: |- account_not_activated: |-
&a一封包含密码的邮件已发送至您的收件箱. &a一封包含密码的邮件已发送至您的收件箱.
&a请在十分钟内完成激活,否则将注销此账户. &a请在十分钟内完成登录,否则将注销此账户.
not_activated: '&c账户未激活,请注册激活后再次尝试.' not_activated: '&c账户未激活,请注册激活后再次尝试.'
password_changed: '&a*** 密码已修改 ***' password_changed: '&a*** 密码已修改 ***'
logout: '&a*** 已成功登出 ***' logout: '&a*** 已成功登出 ***'