diff --git a/VpSharp.Commands/Command.cs b/VpSharp.Commands/Command.cs index dc1e4e0..8928b75 100644 --- a/VpSharp.Commands/Command.cs +++ b/VpSharp.Commands/Command.cs @@ -8,10 +8,10 @@ namespace VpSharp.Commands; /// public sealed class Command { - internal Command(string name, string[] aliases, MethodInfo method, CommandModule module) + internal Command(string name, IReadOnlyList aliases, MethodInfo method, CommandModule module) { Name = name; - Aliases = new ReadOnlyCollection(aliases); + Aliases = aliases; Method = method; Module = module; Parameters = method.GetParameters()[1..]; diff --git a/VpSharp.Commands/CommandsExtension.cs b/VpSharp.Commands/CommandsExtension.cs index 1d799e9..3009cee 100644 --- a/VpSharp.Commands/CommandsExtension.cs +++ b/VpSharp.Commands/CommandsExtension.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using VpSharp.ClientExtensions; using VpSharp.Commands.Attributes; using VpSharp.EventData; @@ -256,7 +256,7 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension var command = new Command( commandAttribute.Name, - aliasesAttribute?.Aliases ?? Array.Empty(), + aliasesAttribute?.Aliases ?? ArraySegment.Empty, methodInfo, module ); diff --git a/VpSharp.Commands/CommandsExtensionConfiguration.cs b/VpSharp.Commands/CommandsExtensionConfiguration.cs index f9e75cf..e023c04 100644 --- a/VpSharp.Commands/CommandsExtensionConfiguration.cs +++ b/VpSharp.Commands/CommandsExtensionConfiguration.cs @@ -9,5 +9,5 @@ public sealed class CommandsExtensionConfiguration /// Gets or sets the prefixes to be use for commands. /// /// The command prefixes, as an array of values. - public string[] Prefixes { get; set; } = Array.Empty(); + public IReadOnlyList Prefixes { get; set; } = Array.Empty(); }