Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a Settings Command. #72

Merged
merged 13 commits into from
Aug 14, 2023
13 changes: 13 additions & 0 deletions Commands/LASettingsCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using LocalAdmin.V2.IO;
using LocalAdmin.V2.Commands.Meta;
using LocalAdmin.V2.Core;
using System;

namespace LocalAdmin.V2.Commands;

internal sealed class LASettingsCommand : CommandBase
{
Config Settings;
iamalexrouse marked this conversation as resolved.
Show resolved Hide resolved
public LASettingsCommand() : base("settings") { }
iamalexrouse marked this conversation as resolved.
Show resolved Hide resolved
internal override void Execute(string[] arguments) => ConsoleUtil.WriteLine(Settings.ToString());
}
1 change: 1 addition & 0 deletions Core/LocalAdmin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@ private void RegisterCommands()
_commandService.RegisterCommand(new ResaveCommand());
_commandService.RegisterCommand(new PluginManagerCommand());
_commandService.RegisterCommand(new LaCfgCommand());
_commandService.RegisterCommand(new LASettingsCommand());
}

private static void ReadInput(Func<string?, bool> checkInput, Action validInputAction, Action invalidInputAction)
Expand Down
2 changes: 1 addition & 1 deletion Core/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
zabszk marked this conversation as resolved.
Show resolved Hide resolved

namespace LocalAdmin.V2.Core;
Expand Down
Loading