diff --git a/CommandHook/CommandDelegate.cs b/CommandHook/CommandDelegate.cs index 78cbf51..20ada7f 100644 --- a/CommandHook/CommandDelegate.cs +++ b/CommandHook/CommandDelegate.cs @@ -2,5 +2,16 @@ using Vintagestory.API.Common; namespace CommandHook; +/// +/// Invoked before a watched command runs. Set data.Cancel = true to stop +/// the command from executing. +/// +/// The command data, passed by ref so you can read or cancel it. public delegate void CommandBeforeDelegate(ref CommandData data); + +/// +/// Invoked after a watched command has run. Not invoked if a Before listener cancelled it. +/// +/// The command data, passed by ref for consistency with . +/// The result the command produced. public delegate void CommandAfterDelegate(ref CommandData data, TextCommandResult result);