mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-09 05:53:22 +00:00
Weekly code cleanup
This commit is contained in:
parent
ffc7a5c7b7
commit
59be72aefe
168 changed files with 5733 additions and 3829 deletions
|
@ -21,13 +21,17 @@
|
|||
|
||||
package com.intellectualcrafters.plot.database;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Connects to and uses a SQLite database
|
||||
*
|
||||
|
@ -37,13 +41,15 @@ import java.util.logging.Level;
|
|||
public class SQLite extends Database {
|
||||
|
||||
private final String dbLocation;
|
||||
private Connection connection;
|
||||
private Connection connection;
|
||||
|
||||
/**
|
||||
* Creates a new SQLite instance
|
||||
*
|
||||
* @param plugin Plugin instance
|
||||
* @param dbLocation Location of the Database (Must end in .db)
|
||||
* @param plugin
|
||||
* Plugin instance
|
||||
* @param dbLocation
|
||||
* Location of the Database (Must end in .db)
|
||||
*/
|
||||
public SQLite(final Plugin plugin, final String dbLocation) {
|
||||
super(plugin);
|
||||
|
@ -62,7 +68,8 @@ public class SQLite extends Database {
|
|||
if (!(file.exists())) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (final IOException e) {
|
||||
}
|
||||
catch (final IOException e) {
|
||||
this.plugin.getLogger().log(Level.SEVERE, "Unable to create database!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue