Added CommandData class to keep track of who sent the command and what the whole command was.

This commit is contained in:
2025-12-02 22:35:41 +01:00
parent 37bda94134
commit 1a59643c02
+20
View File
@@ -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;
}
}