Skip to content

Commit

Permalink
fix allowChangesFrom giving incorrect result
Browse files Browse the repository at this point in the history
  • Loading branch information
Yexeed committed Aug 29, 2024
1 parent 95a67b9 commit a533d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cn/nukkit/command/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public boolean unregister(CommandMap commandMap) {
}

public boolean allowChangesFrom(CommandMap commandMap) {
return commandMap != null && !commandMap.equals(this.commandMap);
return this.commandMap == null || this.commandMap.equals(commandMap);
}

public boolean isRegistered() {
Expand Down

0 comments on commit a533d24

Please sign in to comment.