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

fix: ServerTools Online DB Error #629

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}
}
}
}
Loading