mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-08 21:43:11 +00:00
yo yo yo
testing some new formatting rules + bug fixes
This commit is contained in:
parent
79e0459a3a
commit
3ffb182a3c
90 changed files with 2880 additions and 3807 deletions
|
@ -36,8 +36,7 @@ public class SQLite extends Database {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Connection openConnection() throws SQLException,
|
||||
ClassNotFoundException {
|
||||
public Connection openConnection() throws SQLException, ClassNotFoundException {
|
||||
if (checkConnection()) {
|
||||
return this.connection;
|
||||
}
|
||||
|
@ -48,15 +47,15 @@ public class SQLite extends Database {
|
|||
if (!(file.exists())) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE,
|
||||
"Unable to create database!");
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, "Unable to create database!");
|
||||
}
|
||||
}
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
this.connection = DriverManager.getConnection("jdbc:sqlite:"
|
||||
+ this.plugin.getDataFolder().toPath().toString() + "/"
|
||||
+ this.dbLocation);
|
||||
this.connection =
|
||||
DriverManager.getConnection("jdbc:sqlite:" + this.plugin.getDataFolder().toPath().toString() + "/"
|
||||
+ this.dbLocation);
|
||||
return this.connection;
|
||||
}
|
||||
|
||||
|
@ -80,8 +79,7 @@ public class SQLite extends Database {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResultSet querySQL(String query) throws SQLException,
|
||||
ClassNotFoundException {
|
||||
public ResultSet querySQL(String query) throws SQLException, ClassNotFoundException {
|
||||
if (checkConnection()) {
|
||||
openConnection();
|
||||
}
|
||||
|
@ -94,8 +92,7 @@ public class SQLite extends Database {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int updateSQL(String query) throws SQLException,
|
||||
ClassNotFoundException {
|
||||
public int updateSQL(String query) throws SQLException, ClassNotFoundException {
|
||||
if (checkConnection()) {
|
||||
openConnection();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue