SQLite, network messaging, caching, redis, more bukkit implementing

This commit is contained in:
William committed 2022-05-25 18:45:10 +01:00
1 parent 28a54b0b4a
commit 052eb57438
24 files changed
+1855 -38

No files matched your search

@@ -418,11 +418,11 @@ public class MySqlDatabase extends Database {
try (Connection connection = getConnection()) {
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
SELECT `%homes_table%`.`uuid` AS `home_uuid`, `owner_uuid`, `username` AS `owner_username`, `name`, `description`, `timestamp`, `x`, `y`, `z`, `yaw`, `pitch`, `world_name`, `world_uuid`, `server_name`, `public`
FROM `%homes_table%`
INNER JOIN `%positions_table%` ON `%homes_table%`.`position_id`=`%positions_table%`.`id`
INNER JOIN `%players_table%` ON `%homes_table%`.`owner_uuid`=`%players_table%`.`uuid`
INNER JOIN `%position_metadata_table%` ON `%homes_table%`.`metadata_id`=`%position_metadata_table%`.`id`
WHERE `%homes_table%`.`uuid`=?;"""))) {
FROM `%homes_table%`
INNER JOIN `%positions_table%` ON `%homes_table%`.`position_id`=`%positions_table%`.`id`
INNER JOIN `%players_table%` ON `%homes_table%`.`owner_uuid`=`%players_table%`.`uuid`
INNER JOIN `%position_metadata_table%` ON `%homes_table%`.`metadata_id`=`%position_metadata_table%`.`id`
WHERE `%homes_table%`.`uuid`=?;"""))) {
statement.setString(1, uuid.toString());
final ResultSet resultSet = statement.executeQuery();
@@ -880,4 +880,13 @@ public class MySqlDatabase extends Database {
});
}
@Override
public void terminate() {
if (dataSource != null) {
if (!dataSource.isClosed()) {
dataSource.close();
}
}
}
}