Skip to content

Add strict-home-limit config option#6520

Open
accLarson wants to merge 3 commits intoEssentialsX:2.xfrom
accLarson:2.x
Open

Add strict-home-limit config option#6520
accLarson wants to merge 3 commits intoEssentialsX:2.xfrom
accLarson:2.x

Conversation

@accLarson
Copy link
Copy Markdown

Information

This PR does not have a related Issue/Request.

Details

Proposed feature:
Adds strict-home-limit (default false) to config.yml. When true, /sethome and /home are blocked for players whose home count exceeds their permission-based limit, until they /delhome back 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

  • Most recent Paper version (26.1.2, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

BEFORE
With strict-home-limit set to false (default):
User has 5 homes set: base, vault, explore, jungle, sand
User has a max home value of 3.

javaw_j4NbzgRAnr

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-limit set to true:
User has 5 homes set: base, vault, explore, jungle, sand
User has a max home value of 3.

javaw_qnZdLz0up4

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant