Skip to content

Let admins take items out of /ee log snapshots and view a chest before a visit - #64

Open
Akvarez-java wants to merge 2 commits into
OpenVdra:mainfrom
Akvarez-java:feat/log-take-and-before
Open

Akvarez-java wants to merge 2 commits into
OpenVdra:mainfrom
Akvarez-java:feat/log-take-and-before

Conversation

@Akvarez-java

@Akvarez-java Akvarez-java commented Nov 10, 2026 •

Copy link
Copy Markdown

What

Two additions to the /ee log viewer, aimed at giving lost items back to players:

  • See the chest before a visit. Right-click a log entry to open the chest as it was before that visit. This loads the snapshot of the previous logged visit of the same chest (ChestLogStore.loadPreviousSnapshot). Left-click still shows the chest as it was left. If the log has no earlier visit (first logged one, or older rows were pruned), it falls back to the newest scheduled database backup (backup.folder, SQLite VACUUM INTO files) taken before the visit opened, opened read-only (log/BackupLookup). When both exist, the newer one is shown, and the window title says which one it came from. If neither exists, the admin gets a message.
  • Take items out of a snapshot. A new permission, enhancedechest.admin.log.take (default op), lets an admin take or drop items out of a snapshot. Without the permission, the snapshot stays the read-only sandbox it is today. Each item that leaves a snapshot is written to the console (<admin> took/dropped <n>x <MATERIAL> from log snapshot of <owner> #<index>), so restores can be audited.

Notes

  • No schema change. The "before" view only reads log rows and backup files that already exist.
  • New language keys in en_US and vi_VN: log.lore-click-before, log.snapshot-title-before, log.snapshot-title-backup, admin.log-snapshot-no-before. log.lore-click now reads "Left-click: contents when closed".
  • The "before" view is the previous logged visit. If the chest changed between two visits through a path that does not write a log row (for example a transfer or import), that change is not reflected.
  • ./gradlew test passes. I have not tested this on a live server yet.

🤖 Generated with Claude Code

Akvarez-java and others added 2 commits November 10, 2026 10:07
…e a visit

- Right-click a log entry to open the chest as it was before that visit
  (the previous logged snapshot of the same chest).
- New permission enhancedechest.admin.log.take (default op): take or drop
  items out of a snapshot to restore lost items; each one is logged to the
  console. Without it the snapshot stays a read-only sandbox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the log has no earlier visit of a chest (first logged visit, or older
rows pruned), the before view now reads the chest from the newest scheduled
database backup taken before the visit opened, opened read-only. If both
exist, the newer of the two is shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant