Skip to content

fix: prevent lockpicking accessible containers - #48

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/prevent-lockpicking-accessible-chests
Oct 15, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/prevent-lockpicking-accessible-chests

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

Players could lockpick containers they could already open because the shipped debug setting skipped the access check. Normal container lockpicking now always applies the same single/double chest access rules as opening, including owner, public, guild, faction and staff access. The separate staff test command remains available, and the config comment clarifies that the old debug option now applies only to displays.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed 1,028 tests with zero failures, errors or skips and all 100% coverage gates. Includes 24 new access/debug regression cases; eight Python rollback tests, report validation and runtime JAR validation also passed. Sol review found no actionable issues.

@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 81fcf88f-f633-4a28-b682-b840eed272e0
📥 Commits

Reviewing files that changed from the base of the PR and between 0f7fc84 and 614b866.

📒 Files selected for processing: 3
  • src/main/java/net/tfminecraft/thievery/door/ContainerManager.java
  • src/main/resources/config.yml
  • src/test/java/net/tfminecraft/thievery/door/ContainerManagerTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Lockpicking is now denied when you already have access to a container, including both halves of a double chest. These attempts stop before clues or the lockpicking challenge.
  • Documentation
    • Clarified that display lockpick testing applies only to display locks; use /thievery testpick for containers.

Lockpicking now stops when a player can already access the target container. The check applies regardless of the debug setting and accounts for both halves of a double chest. Tests cover access rules and confirm that later lockpicking operations do not run.

Changes: Container lockpicking

Layer / File(s) Summary
Accessible-container check and test coverage
src/main/java/net/tfminecraft/thievery/door/ContainerManager.java, src/test/java/net/tfminecraft/thievery/door/ContainerManagerTest.java, src/main/resources/config.yml
The access check rejects lockpick attempts when the player can access a single container or both halves of a double chest. Parameterised tests cover access types and both debug settings. The config comment directs container lockpick testing to /thievery testpick.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: drefvelin

Merge Risk: ⚪ Minimal · up to 614b8

No merge-blocking issue is identified; proceed with normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ryanbarlow97
ryanbarlow97 merged commit 87ec1e4 into main Oct 15, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/prevent-lockpicking-accessible-chests branch October 15, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant