Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
3ccaf535
Commit
3ccaf535
authored
Jun 18, 2022
by
Yazawazi
Committed by
Melledy
Jun 17, 2022
Browse files
2nd null check
parent
aba4080b
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/BanCommand.java
View file @
3ccaf535
...
@@ -29,6 +29,9 @@ public final class BanCommand implements CommandHandler {
...
@@ -29,6 +29,9 @@ public final class BanCommand implements CommandHandler {
Account
account
=
player
.
getAccount
();
Account
account
=
player
.
getAccount
();
if
(
account
==
null
)
{
if
(
account
==
null
)
{
account
=
DatabaseHelper
.
getAccountByPlayerId
(
uid
);
account
=
DatabaseHelper
.
getAccountByPlayerId
(
uid
);
if
(
account
==
null
)
{
return
false
;
}
}
}
account
.
setBanReason
(
reason
);
account
.
setBanReason
(
reason
);
...
...
src/main/java/emu/grasscutter/command/commands/UnBanCommand.java
View file @
3ccaf535
...
@@ -30,6 +30,9 @@ public final class UnBanCommand implements CommandHandler {
...
@@ -30,6 +30,9 @@ public final class UnBanCommand implements CommandHandler {
if
(
account
==
null
)
{
if
(
account
==
null
)
{
account
=
DatabaseHelper
.
getAccountByPlayerId
(
uid
);
account
=
DatabaseHelper
.
getAccountByPlayerId
(
uid
);
if
(
account
==
null
)
{
return
false
;
}
}
}
account
.
setBanReason
(
null
);
account
.
setBanReason
(
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment