mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:12:54 +08:00
2nd null check
This commit is contained in:
parent
aba4080b0e
commit
3ccaf535ef
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user