package top.r3944realms.lib39.platform;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.CommandSourceStack;
import top.r3944realms.lib39.api.callback.RegisterCommandHelpCallback;
import top.r3944realms.lib39.core.command.ICommandHelpManager;
import top.r3944realms.lib39.platform.services.IHelpCommandHook;

/**
 * The enum Fabric help command hook.
 */
public enum FabricHelpCommandHook implements IHelpCommandHook {
    /**
     * Instance fabric help command hook.
     */
    INSTANCE;

    @Override
    public void onRegister(LiteralArgumentBuilder<CommandSourceStack> tree, ICommandHelpManager manager, CommandBuildContext context) {
        RegisterCommandHelpCallback.EVENT.invoker().register(new RegisterCommandHelpCallback.CommandHelpRegistrar(tree, manager, context));
    }
}
