mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-07 04:53:00 +00:00
SQL
This commit is contained in:
parent
d836286b6f
commit
d11679aa1e
3 changed files with 11 additions and 10 deletions
|
@ -59,15 +59,15 @@ public class SQLite extends Database {
|
|||
if (checkConnection()) {
|
||||
return this.connection;
|
||||
}
|
||||
if (!this.plotsquared.IMP.getDirectory().exists()) {
|
||||
this.plugin.getDataFolder().mkdirs();
|
||||
if (!PlotSquared.IMP.getDirectory().exists()) {
|
||||
PlotSquared.IMP.getDirectory().mkdirs();
|
||||
}
|
||||
final File file = new File(this.dbLocation);
|
||||
if (!(file.exists())) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (final IOException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, "Unable to create database!");
|
||||
PlotSquared.log("&cUnable to create database!");
|
||||
}
|
||||
}
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue