Back to mods
CommandHook project artwork

Vintage Story Mod DB · Vintage Story mod

CommandHook

What it does CommandHook provides a way for modders to hook onto chat commands. A mod can ask to be notified before a command runs, after it runs, or both, and can stop a command from running if it needs to. Multiple mods can do this on the same command witho

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which CommandHook release matches 1.22.3?

Updated today
Best match for your filters 2.1.0
Game version 1.22.3, 1.22.4, 1.22.5
Loader Built-in Vintage Story mod system

CommandHook 2.1.0 targets 1.22.3, 1.22.4, 1.22.5. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.

Where it goes

Is CommandHook required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This Vintage Story file is marked server-only.

What else does CommandHook 2.1.0 need?

2.1.0 on 1.22.3. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add CommandHook without breaking your instance.

Built for CommandHook 2.1.0 on 1.22.3. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 2.1.0. It targets 1.22.3, 1.22.4, 1.22.5; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 2.1.0. It opens that exact file at the source.

About this project

What does CommandHook add?

What it does

CommandHook provides a way for modders to hook onto chat commands. A mod can ask to be notified before a command runs, after it runs, or both, and can stop a command from running if it needs to. Multiple mods can do this on the same command without stepping on eachother.

What it's for

This mod has no effect on its own. It's for other mods to build on. If you're not a mod developer and nothing else on your server requires it, you don't need it.

Why I built it

There wasn't a generic way for mods to hook into chat commands. If you wanted to know when a command ran, or stop one before it ran, you were patching ChatCommandApi yourself, and if two mods both wanted to watch the same command, you were now coordinating Harmony patches between mods that don't know about each other exist. Figured that was worth solving once instead of every mod doing it separately. Hope it helps.

Source, full usage docs, and a code example are on the repo: https://git.forlornoutpost.ca/anth64/CommandHook

Questions, bugs, feature requests

Drop it in the comments below.

Project description from Vintage Story Mod DB.

Pick your setup

CommandHook releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

4 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

CommandHook versions and loaders

3 of 3 releases match
Clear filters

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.