Skip to content

Commit

Permalink
- Fix the town-is-deleted message being shown twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
LlmDl committed Oct 27, 2023
1 parent 364e3d3 commit 439af91
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Towny/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>towny</artifactId>
<packaging>jar</packaging>
<version>0.100.0.0</version>
<version>0.100.0.1</version>

<licenses>
<license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public void removeTown(Town town, boolean delayFullRemoval) {

for (Resident resident : toSave) {
resident.clearModes();
resident.removeTown();
resident.removeTown(true);
}

// Look for residents inside of this town's jail(s) and free them, more than
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ public void setTown(Town town, boolean updateJoinedAt) throws AlreadyRegisteredE
}

public void removeTown() {

removeTown(false);
}

public void removeTown(boolean townDeleted) {
if (!hasTown())
return;

Expand Down Expand Up @@ -324,7 +327,7 @@ public void removeTown() {
try {
town.removeResident(this);
} catch (EmptyTownException e) {
if (town.exists())
if (!townDeleted)
TownyUniverse.getInstance().getDataSource().removeTown(town, false);
} catch (NotRegisteredException ignored) {}

Expand Down
4 changes: 3 additions & 1 deletion Towny/src/main/resources/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9171,4 +9171,6 @@ v0.92.0.11:
0.99.6.5:
- Add a listener which will reset the player cache when they are inside of a plot or town which has had their plot permissions change.
0.100.0.0:
- Bump version for release.
- Bump version for release.
0.100.0.1:
- Fix the town-is-deleted message being shown twice.

0 comments on commit 439af91

Please sign in to comment.