From 1a76a0d78f7ea55987a0fe6e941bb7dbc38a254e Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Mon, 6 Apr 2020 21:00:09 +0200 Subject: [PATCH] fixed database name problem --- src/main/java/louisvallat/xyz/backhome/BackHome.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/louisvallat/xyz/backhome/BackHome.java b/src/main/java/louisvallat/xyz/backhome/BackHome.java index 93cb9fd..ff11aec 100644 --- a/src/main/java/louisvallat/xyz/backhome/BackHome.java +++ b/src/main/java/louisvallat/xyz/backhome/BackHome.java @@ -12,6 +12,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.plugin.java.JavaPlugin; +import java.io.File; import java.sql.*; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -78,7 +79,7 @@ public class BackHome extends JavaPlugin implements Listener, TabCompleter { * @throws SQLException if the connection couldn't be established. */ private Connection getConnection() throws SQLException { - return DriverManager.getConnection("jdbc:sqlite:" + return DriverManager.getConnection("jdbc:sqlite:" + getDataFolder() + File.separator + getConfig().getString(DB_NAME_KEY)); }