Add strict-home-limit config option#6520
Open
accLarson wants to merge 3 commits intoEssentialsX:2.xfrom
Open
Conversation
# Conflicts: # Essentials/src/main/resources/config.yml
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.
Information
This PR does not have a related Issue/Request.
Details
Proposed feature:
Adds
strict-home-limit(default false) to config.yml. When true,/sethomeand/homeare blocked for players whose home count exceeds their permission-based limit, until they/delhomeback to their limit. Default behavior is unchanged.Admin
/sethome <player>and/home <player>:<name>are unaffected. Adds translation key strictHomeLimitExceeded.This is useful for keeping a player's home count aligned with their current permissions after a temporary grant ends.
Environments tested:
OS: Ubuntu 22.04
Java version: 25
Demonstration:
BEFORE
With
strict-home-limitset to false (default):User has 5 homes set:
base,vault,explore,jungle,sandUser has a max home value of 3.
Screenshot line 1: When the user attempts to set a 6th home, declined.
Screenshot line 2: When the user attempts to sethome with an existing home name, success.
Screenshot line 3: When the user attempts to teleport to an existing home, success.
AFTER
With
strict-home-limitset to true:User has 5 homes set:
base,vault,explore,jungle,sandUser has a max home value of 3.
Screenshot line 1: When the user attempts to set a 6th home, declined.
Screenshot line 2: When the user attempts to sethome with an existing home name, declined.
Screenshot line 3: When the user attempts to teleport to an existing home, declined.
Screenshot line 4: User deletes home jungle (now 4/3 homes)
Screenshot line 5: User deletes home sand (now 3/3 homes)
Screenshot line 6: When the user attempts to teleport to an existing home, success.
Screenshot line 7: When the user attempts to sethome with an existing home name, success.