2nd null check

This commit is contained in:
Yazawazi 2022-06-18 05:23:57 +09:00 committed by Melledy
parent aba4080b0e
commit 3ccaf535ef
2 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,9 @@ public final class BanCommand implements CommandHandler {
Account account = player.getAccount();
if (account == null) {
account = DatabaseHelper.getAccountByPlayerId(uid);
if (account == null) {
return false;
}
}
account.setBanReason(reason);

View File

@ -30,6 +30,9 @@ public final class UnBanCommand implements CommandHandler {
if (account == null) {
account = DatabaseHelper.getAccountByPlayerId(uid);
if (account == null) {
return false;
}
}
account.setBanReason(null);