diff --git a/src/SampSharp.OpenMp.Entities.Commands/Core/CommandDefinition.cs b/src/SampSharp.OpenMp.Entities.Commands/Core/CommandDefinition.cs index 1211ec4e..69bea5a3 100644 --- a/src/SampSharp.OpenMp.Entities.Commands/Core/CommandDefinition.cs +++ b/src/SampSharp.OpenMp.Entities.Commands/Core/CommandDefinition.cs @@ -88,4 +88,16 @@ public CommandDefinition(string name, CommandGroup? group, MethodInfo method, Pa /// Custom metadata tags attached to this overload. public IReadOnlyDictionary Tags => _tags; + + /// + /// Gets the value of the specified command tag, or + /// if the tag is not present. + /// + public string? GetTag(string key) + { + ArgumentException.ThrowIfNullOrEmpty(key); + return _tags.TryGetValue(key, out var value) + ? value + : null; + } }