mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-20 07:19:55 +08:00
2nd null check
This commit is contained in:
committed by
Melledy
Unverified
parent
1ebd8f6810
commit
51df48ee14
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user