fix: Fixes duplicate command listed. (#1677)
This commit is contained in:
parent
4479555156
commit
48e47f9352
3 changed files with 5 additions and 3 deletions
|
|
@ -96,7 +96,7 @@ public static class HelpInfo
|
|||
.ReplaceOrdinal("<", "(")
|
||||
.ReplaceOrdinal(">", ")");
|
||||
|
||||
if (e.Handler.Target == null && usage == null && desc == null)
|
||||
if (e.Handler.Target != null && usage == null && desc == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@ public static class HelpInfo
|
|||
var aliasesAttr = mi.GetCustomAttribute(typeof(AliasesAttribute), false) as AliasesAttribute;
|
||||
var aliases = aliasesAttr?.Aliases;
|
||||
|
||||
list.Add(new CommandInfo(e.AccessLevel, e.Command, aliases, usage, null, desc));
|
||||
list.Add(new CommandInfo(e.AccessLevel, e.Command, aliases, usage ?? e.Command, null, desc ?? "No description available."));
|
||||
}
|
||||
|
||||
for (var i = 0; i < TargetCommands.AllCommands.Count; ++i)
|
||||
|
|
@ -130,7 +130,7 @@ public static class HelpInfo
|
|||
|
||||
desc = desc
|
||||
.ReplaceOrdinal("<", "(")
|
||||
.ReplaceOrdinal(">", ")");
|
||||
.ReplaceOrdinal(">", ")") ?? "No description available.";
|
||||
|
||||
List<string> modsList = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -846,6 +846,8 @@ namespace Server.Factions
|
|||
e.Mobile.SendMessage($"{count} items reset");
|
||||
}
|
||||
|
||||
[Usage("FactionCommander")]
|
||||
[Description("Sets the targeted player as the faction commander.")]
|
||||
public static void FactionCommander_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendMessage("Target a player to make them the faction commander.");
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue