Skip to content

Commit

Permalink
Change to String#equals
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Apr 20, 2022
1 parent c0155b8 commit 7485e9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/emu/grasscutter/commands/CommandMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void invoke(GenshinPlayer player, String rawMessage) {
if(player != null) {
String permissionNode = this.annotations.get(label).permission();
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;
}
}
Expand Down

0 comments on commit 7485e9f

Please sign in to comment.