feat: Implemented height-based protection for claims + PT-BR translation#34
Open
goul4rt wants to merge 3 commits intoBuuz135:mainfrom
Open
feat: Implemented height-based protection for claims + PT-BR translation#34goul4rt wants to merge 3 commits intoBuuz135:mainfrom
goul4rt wants to merge 3 commits intoBuuz135:mainfrom
Conversation
…uration of a minimum protection height. Added admin command `/scp admin-set-min-height <height>` to set this height. Updated language support for error messages and added Portuguese (Brazil) translations. Updated version to 1.0.11.
… height-based protection control, the new admin command for setting minimum height, and the inclusion of Portuguese (Brazil) language support.
655dcd9 to
02bb2b6
Compare
…dmin-set-min-height
|
Can we please validate this and get it added to main? It looks like it was meant to be merged, but the current version doesn't have it, nor is it mentioned anywhere in Patch notes. Thanks |
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.
This PR implements height-based protection for claimed chunks, allowing server administrators to configure a minimum Y coordinate below which blocks are not protected. This feature enables more flexible claim protection, particularly useful for allowing public access to underground areas while maintaining protection for surface structures.
Core Features
/scp admin-set-min-height <height>command to configure the minimum protection height0(entire chunk protected by default)Implementation Details
New Components
InteractionResultclass: New result type that distinguishes between permission-based blocks and height-based blocks, providing better error messagingMinProtectionHeighttoSimpleClaimsConfigwith getter/setter methodsUpdated Systems
All event systems have been updated to respect the minimum protection height:
BreakBlockEventSystem- Block breaking protectionPlaceBlockEventSystem- Block placement protectionInteractEventSystem- Block interaction protectionPickupInteractEventSystem- Item pickup protectionCustomDamageEventSystem- PVP damage protectionAdmin Command
Sets the minimum Y coordinate where blocks will be protected. Blocks below this height are not protected by claims.
Examples:
/scp admin-set-min-height -20- Only protect blocks at Y >= -20/scp admin-set-min-height 0- Protect entire chunk (default)/scp admin-set-min-height 64- Only protect blocks above sea levelBehavior
MinProtectionHeightin a claimed chunk, normal claim protection appliesMinProtectionHeight, the interaction is allowed regardless of claim status