Skip to content

Commit 03b4dd1

Browse files
committed
Made slight changes to the appsettings and how they are retrieved in ApplicationSettings.
1 parent a0e154c commit 03b4dd1

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

src/HyperMC/Settings/ApplicationSettings.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
namespace Hypermc.Settings
88
{
99
public class ApplicationSettings
10-
{
11-
public AppSettings AppSettings { get; set; }
12-
}
13-
14-
public class AppSettings
1510
{
1611
public string AppPath { get; set; }
1712
public string DeafultMinecraftPath { get; set; }

src/HyperMC/Settings/UserSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class UserSettings : IUserSettings
2323

2424
public UserSettings(IFileManager fileManager, IConfiguration config)
2525
{
26-
var settings = config.Get<ApplicationSettings>().AppSettings;
26+
var settings = config.GetSection(nameof(ApplicationSettings)).Get<ApplicationSettings>();
2727
_appPath = string.Format(settings.AppPath, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
2828
_settingsFile = string.Format(settings.SettingsFile, _appPath);
2929

src/HyperMC/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"AppSettings": {
2+
"ApplicationSettings": {
33
"AppPath": "{0}\\.hypermc",
44
"DeafultMinecraftPath": "{0}\\.minecraft",
55
"DefaultModPacksPath": "{0}\\ModPacks",

0 commit comments

Comments
 (0)