Skip to content

Implement support for true/false permission requirements in FancyDialog - #311

Open
Furqit wants to merge 1 commit into
FancyInnovations:mainfrom
Furqit:main
Open

Implement support for true/false permission requirements in FancyDialog#311
Furqit wants to merge 1 commit into
FancyInnovations:mainfrom
Furqit:main

Conversation

@Furqit

@Furqit Furqit commented Aug 3, 2026

Copy link
Copy Markdown

📋 Description

This PR adds support for configuring the expected value of a permission requirement in FancyDialog.

Previously, permission requirements always checked whether the player had the specified permission. This change adds an optional value field, allowing requirements to check whether a player has or does not have a permission.

If value is not specified, it defaults to true, preserving the existing behavior.

🔍 Changes

  • Added an optional value field to permission requirements
  • value: true requires the player to have the permission
  • value: false requires the player to not have the permission
  • Defaults to true when value is not specified
  • Updated the permission requirement check to compare the player's permission status against the expected value

🧪 How to Test

  1. Create a permission requirement without specifying value.
  2. Verify it passes when the player has the required permission.
  3. Set value: true and verify it still passes when the player has the permission.
  4. Set value: false and verify it passes when the player does not have the permission.
  5. Verify that value: false fails when the player does have the permission.

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