Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Commands: fix unregister null command
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Nov 14, 2023
1 parent ac020b8 commit 0f15ed7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/net/flectone/chat/manager/FActionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public void clearAll() {
}

public void clearCommands() {
commandList.forEach(fCommand ->
CommandsUtil.unregisterCommand(fCommand.getCommand()));
commandList.stream()
.filter(fCommand -> fCommand.getCommand() != null)
.forEach(fCommand -> CommandsUtil.unregisterCommand(fCommand.getCommand()));
}

public void clearListeners() {
Expand Down

0 comments on commit 0f15ed7

Please sign in to comment.