diff --git a/CommandHook/CommandData.cs b/CommandHook/CommandData.cs new file mode 100644 index 0000000..3c9425d --- /dev/null +++ b/CommandHook/CommandData.cs @@ -0,0 +1,20 @@ +using Vintagestory.API.Server; + +namespace CommandHook; + +public class CommandData +{ + public IServerPlayer? Sender { get; } + public string FullCommand { get; } + public bool IsPlayerCommand { get; } + public bool Cancel { get; set; } + + + public CommandData(IServerPlayer sender, string fullCommand) + { + Sender = sender; + IsPlayerCommand = Sender != null; + FullCommand = fullCommand?.Trim() ?? string.Empty; + Cancel = false; + } +}