diff --git a/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java b/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java index c44cab0b..886b4c46 100644 --- a/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java +++ b/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java @@ -256,10 +256,9 @@ public Version getMinecraftVersion() { } @Override - public void registerCommands(@NotNull List commands) { - CommandRegistrationCallback.EVENT.register((dispatcher, ignored, ignored2) -> commands.forEach( - (command) -> new FabricCommand(command, this).register(dispatcher)) - ); + public void registerCommands(@NotNull List toRegister) { + CommandRegistrationCallback.EVENT.register((dispatcher, i1, i2) -> toRegister.stream().peek(commands::add) + .forEach((command) -> new FabricCommand(command, this).register(dispatcher))); } @Override