Skip to content

Commit

Permalink
[Exiled::CustomRoles] [Exiled::CustomItems] QoL in List comma…
Browse files Browse the repository at this point in the history
…nds. (#78)

* Ye

* I dont need to use ``ci list registered`` only ``ci list``

* You now that ``customroles list abilities`` exist ?  no ?  yeah its because never say it the command

* Its the same for me

* Pi pi po po

* Im silly @louis1706 uwu

---------

Co-authored-by: Yamato <[email protected]>
  • Loading branch information
SrLicht and louis1706 authored Sep 1, 2024
1 parent cb8fbbe commit 6f5cd2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion EXILED/Exiled.CustomItems/Commands/List/List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ public override void LoadGeneratedCommands()
/// <inheritdoc/>
protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
response = $"Invalid subcommand! Available: registered, insideinventories";
if (arguments.IsEmpty() && TryGetCommand(Registered.Instance.Command, out ICommand command))
{
command.Execute(arguments, sender, out response);
response += $"\nTo view custom items in players' inventories, use the command: {string.Join(" ", arguments.Array)} insideinventories";
return true;
}

response = "Invalid subcommand! Available: registered, insideinventories";
return false;
}
}
Expand Down
9 changes: 8 additions & 1 deletion EXILED/Exiled.CustomRoles/Commands/List/List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ public override void LoadGeneratedCommands()
/// <inheritdoc/>
protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
response = "Invalid subcommand! Available: registered.";
if (arguments.IsEmpty() && TryGetCommand(Registered.Instance.Command, out ICommand command))
{
command.Execute(arguments, sender, out response);
response += $"\nTo view all abilities registered use command: {string.Join(" ", arguments.Array)} abilities";
return true;
}

response = "Invalid subcommand! Available: registered, abilities";
return false;
}
}
Expand Down

0 comments on commit 6f5cd2f

Please sign in to comment.