Fix review findings: NPE guards, formula [level] variable, ChatInput bugs, loop optimizations#81
Merged
tastybento merged 3 commits intodevelopfrom Apr 12, 2026
Merged
Conversation
Merged
… debug log, loop optimizations, ja.yml Agent-Logs-Url: https://github.com/BentoBoxWorld/Upgrades/sessions/a43eb321-a212-416e-994c-4fa6af167be8 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…d input Agent-Logs-Url: https://github.com/BentoBoxWorld/Upgrades/sessions/a43eb321-a212-416e-994c-4fa6af167be8 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Release 0.3.0
Fix review findings: NPE guards, formula [level] variable, ChatInput bugs, loop optimizations
Apr 11, 2026
|
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.




Addresses all 11 review comments from the PR #53 review thread.
NPE guard for legacy upgrades in PanelClick
Legacy upgrades left
ownDescriptionstale when maxed (upgradeValues=nullbutownDescription!=null), bypassing the maxed-out guard and causing NPE incanUpgrade(). All 5 legacy upgrade classes now clearownDescriptionwhen maxed.Formula
[level]variable hard-coded to 0.0MoneyPrice,IslandLevelPrice,RangeReward, andLimitsRewardall bound[level]to0.0, making any level-dependent formula (e.g.100*[level]) evaluate to zero. Addedint currentLevelparameter toPrice.canPay/payandReward.apply:DatabaseUpgradenow passes the actual level through to all price/reward evaluations.ChatInput bugs
getFailedValidationText()returned raw user input instead of theinvalidTextparameterAdminPanel.addUpgrade) in limbo. Now uses aconsumerCalledflag so the abandonment listener callsconsumer.accept(null)on escape/timeout without double-firing on valid inputAdminPanel null guard
addUpgradeconsumer now guards againstnullinput from cancelled conversations instead of concatenating null into the uniqueId.Misc
log("permission: ...")fromCommandUpgrade.isShowed()(hot path during panel render)UpgradesDatalookup out of loop inSpawnerUpgradeListenerandCropGrowthListener(BlockGrowEvent/SpawnerSpawnEventfire frequently)&with&inja.ymlfor correct Minecraft color code parsing