Skip to content

Commit

Permalink
CommandManager.java: Fix log causing CommandAPI exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lokka30 committed Dec 11, 2024
1 parent 65c00e9 commit 444a25d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ public void load() {

public void disable() {
plugin().getLogger().info("Disabling commands.");
CommandAPI.unregister("blackwidow", true);
CommandAPI.onDisable();
CommandAPI.getRegisteredCommands()
.stream()
.map(RegisteredCommand::commandName)
.iterator()
.forEachRemaining(CommandAPI::unregister);
CommandAPI.onDisable();
}

private BlackWidow plugin() {
Expand Down

0 comments on commit 444a25d

Please sign in to comment.