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
107f6b9a
Commit
107f6b9a
authored
Apr 20, 2022
by
KingRainbow44
Browse files
Change to `String#equals`
parent
f58c590a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/commands/CommandMap.java
View file @
107f6b9a
...
@@ -113,7 +113,7 @@ public final class CommandMap {
...
@@ -113,7 +113,7 @@ public final class CommandMap {
if
(
player
!=
null
)
{
if
(
player
!=
null
)
{
String
permissionNode
=
this
.
annotations
.
get
(
label
).
permission
();
String
permissionNode
=
this
.
annotations
.
get
(
label
).
permission
();
Account
account
=
player
.
getAccount
();
Account
account
=
player
.
getAccount
();
if
(!
Objects
.
equals
(
permissionNode
,
"
"
)
&&
!
account
.
hasPermission
(
permissionNode
))
{
if
(!
permissionNode
.
equals
(
"*
"
)
&&
!
account
.
hasPermission
(
permissionNode
))
{
CommandHandler
.
sendMessage
(
player
,
"You do not have permission to run this command."
);
return
;
CommandHandler
.
sendMessage
(
player
,
"You do not have permission to run this command."
);
return
;
}
}
}
}
...
...
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