Finish setting up the ASU command for managing the server settings, and listing all available asu commands

This commit is contained in:
zontreck 2025-01-18 15:12:22 -07:00
parent bd28f36e00
commit 70664e91c4
4 changed files with 51 additions and 3 deletions

View file

@ -85,6 +85,24 @@ namespace AriasServerUtils
api.ChatCommands.Create("home").RequiresPlayer().WithArgs(parsers.OptionalWord("name")).WithDescription("Teleports you to home").RequiresPrivilege(Privilege.chat).HandleWith(Events.HandleGoHome);
api.ChatCommands.Create("delhome").RequiresPlayer().WithArgs(parsers.OptionalWord("name")).WithDescription("Deletes a home entry").RequiresPrivilege(Privilege.chat).HandleWith(Events.HandleDelHome);
api.ChatCommands.Create("homes").RequiresPlayer().WithDescription("Lists your homes").RequiresPrivilege(Privilege.controlserver).HandleWith(Events.HandleListHomes);
api.ChatCommands.Create("asu")
.RequiresPrivilege(Privilege.chat)
.BeginSubCommand("update")
.RequiresPlayer()
.RequiresPrivilege(Privilege.controlserver)
.WithArgs(
parsers.Int("maxHomes"),
parsers.Bool("adminsBypass"))
.HandleWith(Events.HandleUpdateASU)
.WithDescription("Updates the ASU mod configuration")
.EndSubCommand()
.BeginSubCommand("help")
.RequiresPlayer()
.RequiresPrivilege(Privilege.chat)
.HandleWith(Events.HandleASU)
.WithDescription("Lists all Aria's Server Utils commands")
.EndSubCommand();
}
private void OnPlayerDC(IServerPlayer byPlayer)