Skip to content

Commit

Permalink
Merge pull request #629 from UnrealMultiple/servertool
Browse files Browse the repository at this point in the history
fix: ServerTools Online DB Error
  • Loading branch information
Controllerdestiny authored Dec 31, 2024
2 parents 792b96d + 4a08fbe commit ecb5290
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/ServerTools/DB/PlayerDeath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace ServerTools.DB;
[Table("Death")]
public class PlayerDeath : RecordBase<PlayerDeath>
{
[PrimaryKey, Identity]
[PrimaryKey]
[Column("Name")]
public string Name { get; set; } = string.Empty;

Expand All @@ -21,7 +21,7 @@ public class PlayerDeath : RecordBase<PlayerDeath>

private static Context? _context;

public static Context Instance => _context ??= Db.Context<PlayerDeath>("Death");
public static Context Instance => _context ??= Db.Context<PlayerDeath>();

public static PlayerDeath? GetPlayerDeath(string name)
{
Expand Down
6 changes: 3 additions & 3 deletions src/ServerTools/DB/PlayerOnline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace ServerTools.DB;
[Table("OnlineDuration")]
public class PlayerOnline : RecordBase<PlayerOnline>
{
[PrimaryKey, Identity]
[PrimaryKey]
[Column("username")]
public string Name { get; set; } = string.Empty;

Expand All @@ -18,7 +18,7 @@ public class PlayerOnline : RecordBase<PlayerOnline>

private static Context? _context;

public static Context Instance => _context ??= Db.Context<PlayerOnline>("Death");
public static Context Instance => _context ??= Db.Context<PlayerOnline>();

public static PlayerOnline? GetPlayerOnline(string name)
{
Expand Down Expand Up @@ -47,4 +47,4 @@ public static bool Add(string Name, int duration)
}
}

}
}
4 changes: 2 additions & 2 deletions src/ServerTools/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial class Plugin : LazyPlugin

public override string Name => "ServerTools";// 插件名字

public override Version Version => new Version(1, 1, 8, 0);// 插件版本
public override Version Version => new Version(1, 1, 8, 1);// 插件版本

private DateTime LastCommandUseTime = DateTime.Now;

Expand Down Expand Up @@ -518,4 +518,4 @@ private void OnJoin(JoinEventArgs args)
}
}
}
}
}

0 comments on commit ecb5290

Please sign in to comment.