fixed database name problem
This commit is contained in:
parent
993279974b
commit
1a76a0d78f
@ -12,6 +12,7 @@ import org.bukkit.event.Listener;
|
|||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
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.
|
* @throws SQLException if the connection couldn't be established.
|
||||||
*/
|
*/
|
||||||
private Connection getConnection() throws SQLException {
|
private Connection getConnection() throws SQLException {
|
||||||
return DriverManager.getConnection("jdbc:sqlite:"
|
return DriverManager.getConnection("jdbc:sqlite:" + getDataFolder() + File.separator
|
||||||
+ getConfig().getString(DB_NAME_KEY));
|
+ getConfig().getString(DB_NAME_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user