|
|
@ -86,10 +86,9 @@ public class Cosmeticbase { |
|
|
|
try { |
|
|
|
StringBuilder queryBuilder = new StringBuilder(); |
|
|
|
queryBuilder.append("INSERT INTO `BG_Cosmetic` "); |
|
|
|
queryBuilder.append( |
|
|
|
"(`UUID`, `Name`, `Cage`, `Arrow_Trail`, `Feet_Trail`, `KillSound`, 'Victory', 'Ability', 'Kit') "); |
|
|
|
queryBuilder.append("(`UUID`, `Name`, `Cage`, `Arrow_Trail`, `Feet_Trail`, `KillSound`) "); |
|
|
|
queryBuilder.append("VALUES "); |
|
|
|
queryBuilder.append("(?, ?, ?, ?, ?, ?, ?, ?, ?);"); |
|
|
|
queryBuilder.append("(?, ?, ?, ?, ?, ?);"); |
|
|
|
preparedStatement = connection.prepareStatement(queryBuilder.toString()); |
|
|
|
preparedStatement.setString(1, fId); |
|
|
|
preparedStatement.setString(2, name); |
|
|
@ -97,9 +96,6 @@ public class Cosmeticbase { |
|
|
|
preparedStatement.setString(4, "default"); |
|
|
|
preparedStatement.setString(5, "default"); |
|
|
|
preparedStatement.setString(6, "default"); |
|
|
|
preparedStatement.setString(7, "default"); |
|
|
|
preparedStatement.setString(8, "default"); |
|
|
|
preparedStatement.setString(9, "default"); |
|
|
|
preparedStatement.executeUpdate(); |
|
|
|
} catch (final SQLException sqlException) { |
|
|
|
sqlException.printStackTrace(); |
|
|
@ -166,8 +162,7 @@ public class Cosmeticbase { |
|
|
|
ResultSet resultSet = null; |
|
|
|
try { |
|
|
|
StringBuilder queryBuilder = new StringBuilder(); |
|
|
|
queryBuilder.append( |
|
|
|
"SELECT `Cage`, `Arrow_Trail`, `Feet_Trail`, `KillSound`, 'Victory', 'Ability', 'Kit' "); |
|
|
|
queryBuilder.append("SELECT `Cage`, `Arrow_Trail`, `Feet_Trail`, `KillSound` "); |
|
|
|
queryBuilder.append("FROM `BG_Cosmetic` "); |
|
|
|
queryBuilder.append("WHERE `UUID` = ? "); |
|
|
|
queryBuilder.append("LIMIT 1;"); |
|
|
@ -206,18 +201,14 @@ public class Cosmeticbase { |
|
|
|
try { |
|
|
|
StringBuilder queryBuilder = new StringBuilder(); |
|
|
|
queryBuilder.append("UPDATE `BG_Cosmetic` SET "); |
|
|
|
queryBuilder.append( |
|
|
|
"`Cage` = ?, `Arrow_Trail` = ?, `Feet_Trail` = ?, `KillSound` = ?, 'Victory' = ?, 'Ability' = ?, 'Kit' = ?"); |
|
|
|
queryBuilder.append("`Cage` = ?, `Arrow_Trail` = ?, `Feet_Trail` = ?, `KillSound` = ?"); |
|
|
|
queryBuilder.append("WHERE `UUID` = ?;"); |
|
|
|
preparedStatement = connection.prepareStatement(queryBuilder.toString()); |
|
|
|
preparedStatement.setString(1, stat.getCage()); |
|
|
|
preparedStatement.setString(2, stat.getArrow_trail()); |
|
|
|
preparedStatement.setString(3, stat.getFeet_trail()); |
|
|
|
preparedStatement.setString(4, "default"); |
|
|
|
preparedStatement.setString(5, "default"); |
|
|
|
preparedStatement.setString(6, "default"); |
|
|
|
preparedStatement.setString(7, "default"); |
|
|
|
preparedStatement.setString(8, stat.getUUID()); |
|
|
|
preparedStatement.setString(5, stat.getUUID()); |
|
|
|
preparedStatement.executeUpdate(); |
|
|
|
} catch (SQLException sqlException) { |
|
|
|
sqlException.printStackTrace(); |
|
|
@ -242,7 +233,7 @@ public class Cosmeticbase { |
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
try { |
|
|
|
statement.executeUpdate( |
|
|
|
"CREATE TABLE IF NOT EXISTS BG_Cosmetic (UUID VARCHAR(60), Name VARCHAR(60), Cage TEXT, Arrow_Trail TEXT, Feet_Trail TEXT, KillSound TEXT, Victory TEXT, Ability TEXT, Kit TEXT)"); |
|
|
|
"CREATE TABLE IF NOT EXISTS BG_Cosmetic (UUID VARCHAR(60), Name VARCHAR(60), Cage TEXT, Arrow_Trail TEXT, Feet_Trail TEXT, KillSound TEXT)"); |
|
|
|
} catch (SQLException ex) { |
|
|
|
try { |
|
|
|
if (statement != null) { |
|
|
|