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