Fix shop preview locales being sticky#2430
Merged
creatorfromhell merged 4 commits intoJul 6, 2026
Merged
Conversation
Contributor
|
Latest build artifacts are available for this PR. Commit: dd78087 Download the artifact named: |
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.
Summary
Fixes a bug where the title and item lore of the item preview can be shown using the wrong locale to a player due to caching. I've removed using InventoryPreview instances for each shop and instead made it a static method for opening the inventory for a player, since every player will need their own inventory instance for translations to be correct.
Closing inventories when the shop unloads or has its item changed is removed in favor of closing it when the plugin gets disabled, I doubt preview inventories stay open long enough for that to matter and if they do stay open it also doesn't matter much.
Also fixes QuickShopPreviewGUIHolder#getInventory returning null for a notnull method.
Type of Change
Basic Checks
Notes (optional)
Add anything important for reviewers:
Config Changes (if applicable)
Only fill this out if you touched config:
Breaking Changes (if applicable)
Related (optional)