Skip to content

Fix shop preview locales being sticky#2430

Merged
creatorfromhell merged 4 commits into
QuickShop-Community:hikarifrom
Warriorrrr:fix/preview-locale-caching
Jul 6, 2026
Merged

Fix shop preview locales being sticky#2430
creatorfromhell merged 4 commits into
QuickShop-Community:hikarifrom
Warriorrrr:fix/preview-locale-caching

Conversation

@Warriorrrr

Copy link
Copy Markdown
Contributor

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

  • Feature
  • Bug fix
  • Refactor / Cleanup
  • Documentation
  • Breaking change

Basic Checks

  • I have tested these changes locally
  • I confirm no undocumented AI-generated code was used in this submission

Notes (optional)

Add anything important for reviewers:

  • Why this change was needed
  • Edge cases
  • Implementation details

Config Changes (if applicable)

Only fill this out if you touched config:

  • Added/changed:
  • Default values:
  • Any risks or notes:

Breaking Changes (if applicable)

  • What changed:
  • Required action:

Related (optional)

  • Fixes Issue #
  • Related to Issue/PR #

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Latest build artifacts are available for this PR.

Commit: dd78087
Workflow run: https://github.com/QuickShop-Community/QuickShop-Hikari/actions/runs/28797079280

Download the artifact named:

quickshop-pr-2430

@creatorfromhell creatorfromhell merged commit f72d5a8 into QuickShop-Community:hikari Jul 6, 2026
2 checks passed
@Warriorrrr Warriorrrr deleted the fix/preview-locale-caching branch July 9, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants