Fix maxJailedUnjail method when town has no jailed residents#8141
Merged
LlmDl merged 1 commit intoTownyAdvanced:masterfrom Apr 1, 2026
Merged
Fix maxJailedUnjail method when town has no jailed residents#8141LlmDl merged 1 commit intoTownyAdvanced:masterfrom
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
Conversation
When a town has no jailed residents, .get() on an empty Optional throws a NoSuchElementException. Added an isEmpty() check to fix this.
Warriorrrr
approved these changes
Mar 19, 2026
LlmDl
added a commit
that referenced
this pull request
Apr 1, 2026
PR #8129. - Fix maxJailedUnjail method when town has no jailed residents, courtesy of Dionert with PR #8141. (First-Time Contributor!) - Add maximum deposit and withdraw settings for towns and nations. - Closes #8046. - New Config Option: economy.banks.town_max_deposit - Default: -1 - When greater than -1, the maximum amount of money players are allowed to deposit in town bank at a time. - New Config Option: economy.banks.town_max_withdraw - Default: -1 - When greater than -1, the maximum amount of money players are allowed to withdraw from town bank at a time. - New Config Option: economy.banks.nation_max_deposit - Default: -1 - When greater than -1, the maximum amount of money players are allowed to deposit in nation bank at a time. - New Config Option: economy.banks.nation_max_withdraw - Default: -1 - When greater than -1, the maximum amount of money players are allowed to withdraw from nation bank at a time. - Send dangerous action confirmation messages in red instead of gray, courtesy of Veyronity with PR #8145. - Remove enderchests from default switch_ids config, courtesy of Warrior with PR #8147. - Fix /towny prices missing the max tax percent caps when a town or nation has taxpercent in use. - Bump org.apache.logging.log4j:log4j-core from 2.25.3 to 2.25.4. - Bump io.github.git-commit-id:git-commit-id-maven-plugin from 9.0.2 to 9.1.0.
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:
When a town has no jailed residents, .get() on an empty Optional throws a NoSuchElementException. Added an isEmpty() check to fix this.
New Nodes/Commands/ConfigOptions: -
Relevant Towny Issue ticket: -
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.