Skip to content

Fix item protection triggering on non-owned items#2427

Open
legentpc wants to merge 2 commits into
SkyblockerMod:mainfrom
legentpc:fix-item-protect
Open

Fix item protection triggering on non-owned items#2427
legentpc wants to merge 2 commits into
SkyblockerMod:mainfrom
legentpc:fix-item-protect

Conversation

@legentpc

Copy link
Copy Markdown
Contributor

What

Item protection now only applies to items in the player's own inventory, and the hotbar handler is skipped when any screen is open.

Problem

The item protection keybind (V) was incorrectly triggering on non-owned items (Auction House, Bazaar, NPC shops, etc.) and double-firing on the hotbar item when a container screen was open.

Fixes GH-2424

Changelog Fixes

  • Fixed item protection keybind triggering on items not owned by the player in container screens.

@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label May 30, 2026
@olim88

olim88 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The code looks good. However, this also stops people from protecting items in their backpacks / echest/ chests. I feel like as the bug does not harm the user in any way it would be silly to make a regression to fix it.

Maybe it should just exclude AH. or have an white list to fix this.

@legentpc legentpc closed this Jun 5, 2026
@LifeIsAParadox LifeIsAParadox removed the reviews needed This PR needs reviews label Jun 5, 2026
@legentpc

legentpc commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

I tried multiple approaches to fix this but couldn't get it working correctly. Closing for now.

@legentpc legentpc reopened this Jun 5, 2026
@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label Jun 5, 2026
@legentpc legentpc force-pushed the fix-item-protect branch from 1349a0b to 7bf0f05 Compare June 5, 2026 16:58

@olim88 olim88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

@LifeIsAParadox LifeIsAParadox added merge me please Pull requests that are ready to merge and removed reviews needed This PR needs reviews labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me please Pull requests that are ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants