Repository navigation
Conversation
Inventory#dropAll and EntityEquipment#dropAll spawn the death drops directly via Level#addFreshEntity instead of going through Player#drop, so they were never logged. Hook both and log them as regular item drops.
Each result line read from the database gets a clickable [R] that rolls back just that action. The click is handled server-side and re-checks the ledger.commands.rollback permission.
Items that reach the end of their lifetime are now logged as item-despawn with the source @DeSpawn. Rolling one back respawns the item with its age reset, so it does not despawn again on the next tick; restoring removes it again.
Rolling back item-despawn actions now needs ledger.commands.rollback.item-despawn (default level 4). Without it, despawns are excluded from rollbacks and rollback previews, and asking for action:item-despawn explicitly fails with an error.
# Conflicts: # src/main/resources/data/ledger/lang/de_de.json # src/main/resources/data/ledger/lang/en_us.json
When a player's tool, weapon or worn armor runs out of durability it is logged as item-break. Rolling it back drops the item where it broke with one durability left; restoring removes it again.
# Conflicts: # docs/actions.md # src/main/kotlin/com/github/quiltservertools/ledger/actionutils/ActionFactory.kt # src/main/kotlin/com/github/quiltservertools/ledger/registry/ActionRegistry.kt # src/main/resources/data/ledger/lang/de_de.json # src/main/resources/data/ledger/lang/en_us.json
The [R] button on search and inspect results is now only appended when the viewer has ledger.commands.rollback. The click handler still checks the permission on its own.
Despawn entries only get the [R] button when the viewer also has ledger.commands.rollback.item-despawn.
Taking a renamed item out of an anvil is logged as item-rename at the anvil's position, with the item's name before and after. Repairs and enchantments that keep the name are not logged. The action is log-only: the item can be anywhere by now, so it has no rollback or restore.
Lava flowing down into water turns it into stone through LavaFluid#spreadTo, which skips LiquidBlock#shouldSpreadLiquid where cobblestone and obsidian are logged. Log it there as a fluid block place as well.
The player stored on use was never cleared, and LeverBlock/ButtonBlock are shared by every placed lever and button. A later pull or press without a player, e.g. by a wind charge, was logged as the player who last used any lever or button.
Wind charges open doors, trapdoors and fence gates, flip levers, press buttons and blow out candles. Each hit that leaves the block in a different state is now logged as a block change with the charge as source and its thrower as player. The trapdoor and candle hooks skip these hits so they are not logged twice.
This branch has not been deployed
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.
fix: log armor stand equipment before it is dropped on break
Vanilla calls brokenByAnything, which drops all equipment and empties
every slot, before it calls kill. Logging at the kill call therefore
stored an armor stand whose equipment tag was omitted entirely, so a
rollback brought back an empty stand and the items were lost.
Log at the head of brokenByAnything instead, while the equipment is
still attached, and guard the existing kill hooks so the break is not
recorded twice. The kill hooks still cover the paths that skip
brokenByAnything (creative players, damage bypassing invulnerability).