mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-07-04 00:36:08 +00:00
parent
5678934b0e
commit
c3602ee5e1
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
||||
<groupId>me.SuperRonanCraft</groupId>
|
||||
<artifactId>BetterRTP</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>3.6.10</version>
|
||||
<version>3.6.11</version>
|
||||
|
||||
<!-- Upload patches to https://repo.ronanplugins.com/#/ -->
|
||||
|
||||
|
@ -51,8 +51,12 @@ public class DatabaseCooldowns extends SQLite {
|
||||
}
|
||||
|
||||
public void removePlayer(UUID uuid, World world) {
|
||||
String sql = "DELETE FROM " + world.getName() + " WHERE "
|
||||
+ COLUMNS.UUID.name + " = ?";
|
||||
// Create SQL query string with backtick-ed table name to allow for special characters
|
||||
String sql = String.format(
|
||||
"DELETE FROM `%s` WHERE %s = ?",
|
||||
world.getName(),
|
||||
COLUMNS.UUID.name
|
||||
);
|
||||
List<Object> params = new ArrayList<Object>() {{
|
||||
add(uuid.toString());
|
||||
}};
|
||||
@ -65,7 +69,12 @@ public class DatabaseCooldowns extends SQLite {
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
conn = getSQLConnection();
|
||||
ps = conn.prepareStatement("SELECT * FROM " + world.getName() + " WHERE " + COLUMNS.UUID.name + " = ?");
|
||||
// Create prepared statement with backtick-ed table name to allow for special characters
|
||||
ps = conn.prepareStatement(String.format(
|
||||
"SELECT * FROM `%s` WHERE %s = ?",
|
||||
world.getName(),
|
||||
COLUMNS.UUID.name
|
||||
));
|
||||
ps.setString(1, uuid.toString());
|
||||
|
||||
rs = ps.executeQuery();
|
||||
|
Loading…
x
Reference in New Issue
Block a user