Commit 3ccaf535 authored by Yazawazi's avatar Yazawazi Committed by Melledy
Browse files

2nd null check

parent aba4080b
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment