From 547f778750bb3b9ce0662cf3e9b253e1c28eeb7b Mon Sep 17 00:00:00 2001 From: LlmDl Date: Sun, 28 Jul 2024 08:39:12 -0500 Subject: [PATCH] - Fix loading of Districts on servers using MySQL. --- .../com/palmergames/bukkit/towny/db/TownySQLSource.java | 6 +++--- Towny/src/main/resources/ChangeLog.txt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownySQLSource.java b/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownySQLSource.java index a068f59ef4..32ea1046d2 100644 --- a/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownySQLSource.java +++ b/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownySQLSource.java @@ -2112,7 +2112,7 @@ private boolean loadDistrict(ResultSet rs) { String uuidString = null; try { - PlotGroup district = universe.getGroup(UUID.fromString(rs.getString("uuid"))); + District district = universe.getDistrict(UUID.fromString(rs.getString("uuid"))); if (district == null) { TownyMessaging.sendErrorMsg("SQL: A district was not registered properly on load!"); return true; @@ -2130,14 +2130,14 @@ private boolean loadDistrict(ResultSet rs) { if (line != null) { UUID uuid = UUID.fromString(line.trim()); if (uuid == null) { - deletePlotGroup(district); + deleteDistrict(district); return true; } Town town = universe.getTown(uuid); if (town != null) { district.setTown(town); } else { - deletePlotGroup(district); + deleteDistrict(district); return true; } } diff --git a/Towny/src/main/resources/ChangeLog.txt b/Towny/src/main/resources/ChangeLog.txt index 7bf0d073be..1eb7698802 100644 --- a/Towny/src/main/resources/ChangeLog.txt +++ b/Towny/src/main/resources/ChangeLog.txt @@ -9946,4 +9946,5 @@ v0.92.0.11: - Always fire loaded metadata event, courtesy of Warrior with PR #7531. - Remove newday timer option, courtesy of Warrior with PR #7509. - Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.0 to 3.3.1. - - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0. \ No newline at end of file + - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0. + - Fix loading of Districts on servers using MySQL. \ No newline at end of file