Add placeholders for flag state (enabled/disabled)#2913
Merged
tastybento merged 2 commits intodevelopfrom Apr 6, 2026
Merged
Conversation
2 tasks
Register placeholders for each flag (protection, setting, world setting) so users can query flag states via PlaceholderAPI. For example: - %bskyblock_flag_pvp_overworld% returns true/false - %bskyblock_flag_break_blocks% returns the minimum allowed rank name - %bskyblock_flag_ender_chest% returns true/false Built-in flags get placeholders when registerDefaultPlaceholders() runs. Addon-defined flags get placeholders dynamically when registered. Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/5b7af0c7-302d-4943-bb55-7383a22040ae Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add placeholders for flag state (enabled/disabled)
Add placeholders for flag state (enabled/disabled)
Apr 6, 2026
|
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.



Registers PlaceholderAPI placeholders for every flag, exposing island/world flag states to external plugins. Each flag gets
flag_<FLAG_ID_LOWERCASE>scoped per game mode.Placeholder values by flag type
Member)true/falsefrom island settingtrue/falsefrom world settingChanges
PlaceholdersManager: AddedregisterFlagPlaceholder(GameModeAddon, Flag)(public, for dynamic registration) andresolveFlagValue()which dispatches onFlag.Type. Called fromregisterDefaultPlaceholders()for built-in flags.FlagsManager:registerFlag()now callsPlaceholdersManager.registerFlagPlaceholder()for all active game mode addons, so addon-defined flags get placeholders at registration time.getFlagsManager()/getPlaceholdersManager()/getAddonsManager()for startup ordering safety.