First post here, and first mod, so go easy on me.
I wanted to build some mods for my server that would need to listen for commands, and quickly ran into the problem of not being able to do that easily without repeating the same patching logic every time I needed it in a new mod. So I built a small mod/library/api/whatever you want to call it, so anyone else running into the same issue can just use it instead.
So now we have CommandHook. A mod can ask to be notified before a chat command runs, after it runs, or both, and can stop the command from running if it needs to. Multiple mods can do this on the same command without stepping on each other.
Repo, full usage docs, and a code example: https://git.forlornoutpost.ca/anth64/CommandHook
ModDB page: https://mods.vintagestory.at/show/mod/56633
I am happy to answer questions or hear feedback, this being a first mod and all.