Some optimization, fixed copyright.

This commit is contained in:
Sauilitired 2014-11-08 20:27:09 +01:00
parent bcc34e7cd8
commit f71fabbfbf
143 changed files with 5090 additions and 4580 deletions

View file

@ -1,16 +1,33 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// PlotSquared - A plot manager and world generator for the Bukkit API /
// Copyright (c) 2014 IntellectualSites/IntellectualCrafters /
// /
// This program is free software; you can redistribute it and/or modify /
// it under the terms of the GNU General Public License as published by /
// the Free Software Foundation; either version 3 of the License, or /
// (at your option) any later version. /
// /
// This program is distributed in the hope that it will be useful, /
// but WITHOUT ANY WARRANTY; without even the implied warranty of /
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /
// GNU General Public License for more details. /
// /
// You should have received a copy of the GNU General Public License /
// along with this program; if not, write to the Free Software Foundation, /
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA /
// /
// You can contact us via: support@intellectualsites.com /
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.database;
import org.bukkit.plugin.Plugin;
import java.io.File;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.*;
import java.util.logging.Level;
import org.bukkit.plugin.Plugin;
/**
* Connects to and uses a SQLite database
*
@ -19,16 +36,14 @@ import org.bukkit.plugin.Plugin;
*/
public class SQLite extends Database {
private Connection connection;
private Connection connection;
private final String dbLocation;
/**
* 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);
@ -47,8 +62,7 @@ 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!");
}
}