Skip to content

Commit

Permalink
Merge pull request #222 from 1242509682/master
Browse files Browse the repository at this point in the history
更新:宵禁 v2.2.0
  • Loading branch information
Controllerdestiny authored Jun 18, 2024
2 parents 7213b7d + 4eee0bf commit c560107
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions GoodNight/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public static void GnCmd(CommandArgs args)
}
else
{

npc = matchedNPCs[0];
}

Expand Down
4 changes: 2 additions & 2 deletions GoodNight/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void Write()
sw.Write(JsonConvert.SerializeObject(this, Formatting.Indented));
}

public static Configuration Read(string path)
public static Configuration Read()
{
if (!File.Exists(FilePath))
{
Expand All @@ -60,7 +60,7 @@ public static Configuration Read(string path)
}
else
{
using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))
using (var fs = new FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read))
using (var sr = new StreamReader(fs))
return JsonConvert.DeserializeObject<Configuration>(sr.ReadToEnd())!;
}
Expand Down
2 changes: 1 addition & 1 deletion GoodNight/Goodnight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected override void Dispose(bool disposing)
internal static void LoadConfig(ReloadEventArgs args = null!)
{
if (File.Exists(Configuration.FilePath))
Config = Configuration.Read(Configuration.FilePath);
Config = Configuration.Read();
else
{
Config.PlayersList = new() { "羽学" };
Expand Down

0 comments on commit c560107

Please sign in to comment.