Skip to content

Commit

Permalink
[player-database]
Browse files Browse the repository at this point in the history
+ 增加手动构造SQLite类型数据库
  • Loading branch information
FxRayHughes committed Aug 1, 2024
1 parent 86ff464 commit 9b7a0c5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ fun setupPlayerDatabase(file: File = newFile(getDataFolder(), "data.db"), tableN
playerDatabase = Database(TypeSQLite(file, tableName))
}

fun buildPlayerDatabase(file: File = newFile(getDataFolder(), "data.db"), table: String): Database {
return Database(TypeSQLite(file, table))
}

fun ProxyPlayer.getDataContainer(): DataContainer {
return playerDataContainer[uniqueId] ?: error("unavailable")
}
Expand Down

0 comments on commit 9b7a0c5

Please sign in to comment.