fix: /back not working on Fabric, close #713

Also broke the command list (`/huskhomes help`)
This commit is contained in:
William committed 2024-11-08 22:21:37 +00:00
1 parent 6cfd480145
commit 9d17faf722
1 file changed
+3 -4
@@ -256,10 +256,9 @@ public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes
}
@Override
public void registerCommands(@NotNull List<Command> commands) {
CommandRegistrationCallback.EVENT.register((dispatcher, ignored, ignored2) -> commands.forEach(
(command) -> new FabricCommand(command, this).register(dispatcher))
);
public void registerCommands(@NotNull List<Command> toRegister) {
CommandRegistrationCallback.EVENT.register((dispatcher, i1, i2) -> toRegister.stream().peek(commands::add)
.forEach((command) -> new FabricCommand(command, this).register(dispatcher)));
}
@Override