feat: Implemented height-based protection for claims + PT-BR translation #34
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