From 9b7a0c537c20862275f06d443180d86d9a18b433 Mon Sep 17 00:00:00 2001 From: FxRayHughes Date: Thu, 1 Aug 2024 15:53:19 +0800 Subject: [PATCH] =?UTF-8?q?[player-database]=20+=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E6=9E=84=E9=80=A0SQLite=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/kotlin/taboolib/expansion/DatabaseHandler.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/expansion/expansion-player-database/src/main/kotlin/taboolib/expansion/DatabaseHandler.kt b/expansion/expansion-player-database/src/main/kotlin/taboolib/expansion/DatabaseHandler.kt index a14e1c504..f9be98552 100644 --- a/expansion/expansion-player-database/src/main/kotlin/taboolib/expansion/DatabaseHandler.kt +++ b/expansion/expansion-player-database/src/main/kotlin/taboolib/expansion/DatabaseHandler.kt @@ -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") }