Hotfix/dupe unclaim - #473
Closed
bestzige wants to merge 8 commits into
Closed
Conversation
Root cause: - /ps unclaim returned the protection stone item before deleting the region. - On Folia/Canvas, deleting the protection block could fail when it touched an unloaded chunk or the wrong region thread. - When that happened, the player already received the item, but the WorldGuard region still existed, allowing repeated unclaim attempts to duplicate items. Changes: - Move item return to happen only after the region is successfully deleted. - Run the unclaim delete step on the Folia region scheduler for the protection stone location. - Add a region-exists check to prevent repeated/concurrent unclaim attempts from returning duplicate items. - Pre-check inventory space when item dropping is disabled, preserving the no-room behavior before deletion. - Catch delete failures so failed unclaims do not return items. Merged region handling: - Stop using deleteRegion(true) from /ps unclaim because merged regions may contain protection blocks in multiple Folia region threads. - Delete the WorldGuard/merged region data first with deleteRegion(false). - Snapshot all protection block locations before deletion. - Schedule each physical protection block removal on its own Folia region scheduler. - Only remove a block if it still matches the original protection block type.
…ion" This reverts commit c32a925.
…tion" This reverts commit 901c059.
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.
No description provided.