diff --git a/pom.xml b/pom.xml index 55e8d88..df98b81 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 at.pcgamingfreaks MinePacks - 1.2.1 + 1.2.2 in-project diff --git a/src/at/pcgamingfreaks/georgh/MinePacks/Database/SQLite.java b/src/at/pcgamingfreaks/georgh/MinePacks/Database/SQLite.java index 0066217..323e4db 100644 --- a/src/at/pcgamingfreaks/georgh/MinePacks/Database/SQLite.java +++ b/src/at/pcgamingfreaks/georgh/MinePacks/Database/SQLite.java @@ -113,12 +113,12 @@ private void CheckDB() try { Statement stmt = GetConnection().createStatement(); - stmt.execute("CREATE TABLE IF NOT EXISTS `" + Table_Players + "` (`player_id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` CHAR(16) NOT NULL UNIQUE);"); + stmt.execute("CREATE TABLE IF NOT EXISTS `" + Table_Players + "` (`player_id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` CHAR(16) NOT NULL UNIQUE)" + ((plugin.UseUUIDs) ? ", `uuid` CHAR(32) UNIQUE" : "") +";"); if(plugin.UseUUIDs) { try { - stmt.execute("ALTER TABLE `" + Table_Players + "` ADD COLUMN `uuid` CHAR(32) UNIQUE;"); + stmt.execute("ALTER TABLE `" + Table_Players + "` ADD COLUMN `uuid` CHAR(32);"); } catch(SQLException e) { } }