Skip to content

fix: superiorskyblock2 permission hook#265

Merged
ptthanh02 merged 1 commit into
OpenVdra:mainfrom
Starfruit2210:main
Jun 15, 2026
Merged

fix: superiorskyblock2 permission hook#265
ptthanh02 merged 1 commit into
OpenVdra:mainfrom
Starfruit2210:main

Conversation

@Starfruit2210

@Starfruit2210 Starfruit2210 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

fixed an issue where if one permsision already exist, the other permission does not work and wont initialize. therefore i've changed of it register one permission at a time instead at the same time

@Starfruit2210

Copy link
Copy Markdown
Contributor Author

Tested on my production server as well, and the issue has been fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the SuperiorSkyblock2 protection hook initialization so each required privilege is registered/loaded independently, addressing cases where one privilege already exists but the other doesn’t initialize properly.

Changes:

  • Refactors privilege setup to resolve/register spawner_stack and spawner_open_menu separately.
  • Introduces a helper method to centralize privilege lookup/registration logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +40
SPAWNER_STACK = getOrRegisterPrivilege(SPAWNER_STACK_PERM);
SPAWNER_OPEN_MENU = getOrRegisterPrivilege(SPAWNER_OPEN_MENU_PERM);
registered = true;
}

private static IslandPrivilege getOrRegisterPrivilege(String name) {
@ptthanh02 ptthanh02 merged commit 1ccd77c into OpenVdra:main Jun 15, 2026
1 check 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.

3 participants