Fix a bunch of nation and town level weirdness#8091
Merged
Conversation
LlmDl
reviewed
Jan 30, 2026
Member
LlmDl
left a comment
There was a problem hiding this comment.
Looks pretty good, it would be nice to see the "i tested this stuff" checkbox checked on this one.
...in/java/com/palmergames/bukkit/towny/event/nation/NationCalculateNationLevelNumberEvent.java
Outdated
Show resolved
Hide resolved
LlmDl
approved these changes
Mar 12, 2026
Member
|
Just a small merge conflict now. |
Contributor
Contributor
|
This PR does fix my above error and seems to work fine otherwise. Thank you Warriorrrr. |
LlmDl
added a commit
that referenced
this pull request
Mar 16, 2026
with PR #8091. - Fixed getTownLevelMax always being 1 too high - Fixed TownLevelDecrease/IncreaseEvent firing for towns that have a manually set town level. - Fixed the code around the Town/NationLevelDecrease/IncreaseEvent bypassing the level calculate events, possibly causing them to be wrongly fired when a plugin is calculating its own levels with the level calculate events. - Town merge: - Fixed the town's resident amount being used instead of the nation's resident amount for max outpost calculations. - Fixed max purchased blocks not using the number of townblocks to calculate the town level when configured to do so. - Fixed the purchased and bonus blocks of the succumbing town not being limited by the town block limit option when the town_block_ratio is in use. - Fixed nation level methods wrongly using the modifier and level interchangeably (i.e. getNationLevelFromGivenInt was returning the floored modifier rather than the actual level). - Fix not throwing PlayerChangePlotEvents for passengers. - Add NationRangeAllowTownEvent, courtesy of Veyronity with PR #8128. - An event thrown when a town is assessed during the nation proximity tests, allowing plugins to modify nation proximity rules on a per-town basis. - Bump org.apache.maven.plugins:maven-shade-plugin from 3.6.1 to 3.6.2.
Jsinco
pushed a commit
to LumaLibre/Towny
that referenced
this pull request
Mar 31, 2026
* Fix a bunch of nation and town level weirdness * -1 for nation level max too * Fix poorly resolved merge conflict done via web interface. * Update since placeholders and a javadoc. --------- Co-authored-by: LlmDl <LlmDlio@gmail.com>
Jsinco
pushed a commit
to LumaLibre/Towny
that referenced
this pull request
Mar 31, 2026
with PR TownyAdvanced#8091. - Fixed getTownLevelMax always being 1 too high - Fixed TownLevelDecrease/IncreaseEvent firing for towns that have a manually set town level. - Fixed the code around the Town/NationLevelDecrease/IncreaseEvent bypassing the level calculate events, possibly causing them to be wrongly fired when a plugin is calculating its own levels with the level calculate events. - Town merge: - Fixed the town's resident amount being used instead of the nation's resident amount for max outpost calculations. - Fixed max purchased blocks not using the number of townblocks to calculate the town level when configured to do so. - Fixed the purchased and bonus blocks of the succumbing town not being limited by the town block limit option when the town_block_ratio is in use. - Fixed nation level methods wrongly using the modifier and level interchangeably (i.e. getNationLevelFromGivenInt was returning the floored modifier rather than the actual level). - Fix not throwing PlayerChangePlotEvents for passengers. - Add NationRangeAllowTownEvent, courtesy of Veyronity with PR TownyAdvanced#8128. - An event thrown when a town is assessed during the nation proximity tests, allowing plugins to modify nation proximity rules on a per-town basis. - Bump org.apache.maven.plugins:maven-shade-plugin from 3.6.1 to 3.6.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description:
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.