diff --git a/Towny/pom.xml b/Towny/pom.xml index 9869ecc078..c56e7ea2d3 100644 --- a/Towny/pom.xml +++ b/Towny/pom.xml @@ -13,7 +13,7 @@ towny jar - 0.100.0.0 + 0.100.0.1 diff --git a/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownyDatabaseHandler.java b/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownyDatabaseHandler.java index fa25157253..26e2ada6a3 100644 --- a/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownyDatabaseHandler.java +++ b/Towny/src/main/java/com/palmergames/bukkit/towny/db/TownyDatabaseHandler.java @@ -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 diff --git a/Towny/src/main/java/com/palmergames/bukkit/towny/object/Resident.java b/Towny/src/main/java/com/palmergames/bukkit/towny/object/Resident.java index 918199d7b4..b5870f7af8 100644 --- a/Towny/src/main/java/com/palmergames/bukkit/towny/object/Resident.java +++ b/Towny/src/main/java/com/palmergames/bukkit/towny/object/Resident.java @@ -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; @@ -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) {} diff --git a/Towny/src/main/resources/ChangeLog.txt b/Towny/src/main/resources/ChangeLog.txt index 78d7a62f7f..967fc7d2f5 100644 --- a/Towny/src/main/resources/ChangeLog.txt +++ b/Towny/src/main/resources/ChangeLog.txt @@ -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. \ No newline at end of file + - Bump version for release. +0.100.0.1: + - Fix the town-is-deleted message being shown twice. \ No newline at end of file