Skip to content

Add opt-in support for team members' limit permissions#282

Merged
tastybento merged 1 commit into
masterfrom
feat/241-member-limit-perms
Jul 10, 2026
Merged

Add opt-in support for team members' limit permissions#282
tastybento merged 1 commit into
masterfrom
feat/241-member-limit-perms

Conversation

@tastybento

Copy link
Copy Markdown
Member

Fixes #241 (canonical ticket for #164 and part of #147's fallout).

What

New config option, off by default:

apply-member-limit-perms: false

When enabled:

  • A team member's login merges their <gamemode>.island.limit.* permissions into the island's limits — the highest value wins, nothing is cleared.
  • The owner's login keeps the existing clear-and-recalculate behaviour, then merges in the permissions of all online team members, so an owner relog doesn't wipe member contributions while they're around.
  • Same merge runs on island creation/reset/registration and ownership transfer (after the new owner's perms are applied).
  • Coop and trusted players are not team members (Island.getMemberSet() is rank ≥ MEMBER) and never apply.

Documented caveat (in config comments): limits recalculate on login, so revoking a member's permission or kicking them takes effect at the owner's next login — consistent with how owner permissions already behave.

How

JoinListener.checkPerms is split into the clearing part and a new mergePerms (apply without clearing — the max-merge already existed in applyLimit). onPlayerJoin now also matches islands where the player is a qualifying member. The LimitsJoinPermCheckEvent fires for member joins too, so other plugins can cancel.

Tests

Five new JUnit cases: member ignored when disabled; member merged when enabled (and never clears); member perm doesn't lower a higher existing limit; owner join merges online members' perms after recalc; offline members ignored. Full suite: 261 tests green.

In-game test plan

  1. Enable apply-member-limit-perms: true, set blocklimits: HOPPER: 10.
  2. Owner (no perms) + member with bskyblock.island.limit.hopper.50: member logs in → /is limits shows 50 for both.
  3. Owner relogs while member online → still 50. Owner relogs while member offline → back to 10 (documented caveat).
  4. Give a coop player the same perm → no effect.
  5. Transfer ownership to the member → limits recalculated from new owner's perms.
  6. With the option left false (default) → member perms have no effect (current behaviour unchanged).

🤖 Generated with Claude Code

https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB

@tastybento tastybento force-pushed the feat/241-member-limit-perms branch from 8b25c01 to c9aa5c8 Compare July 10, 2026 20:32
Permission-based limits were applied from the island owner only, which
surprises team servers where a member buys a rank with higher limits.

New config option apply-member-limit-perms (default false). When enabled,
a team member's login merges their limit permissions into the island's
limits (highest value wins), and the owner's login still recalculates
from scratch and then merges the permissions of all online team members.
Coop and trusted players do not qualify. Limits recalculate on login, so
revoking a member's permission takes effect at the owner's next login.

Fixes #241

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
@tastybento tastybento force-pushed the feat/241-member-limit-perms branch from c9aa5c8 to 7f6b3b5 Compare July 10, 2026 20:38
@sonarqubecloud

Copy link
Copy Markdown

@tastybento tastybento merged commit 6b01d70 into master Jul 10, 2026
3 checks passed
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