Skip to content

Commit

Permalink
- Fix loading of Districts on servers using MySQL.
Browse files Browse the repository at this point in the history
  • Loading branch information
LlmDl committed Jul 28, 2024
1 parent 015a596 commit 547f778
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down
3 changes: 2 additions & 1 deletion Towny/src/main/resources/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0.
- Fix loading of Districts on servers using MySQL.

0 comments on commit 547f778

Please sign in to comment.