Skip to content

Avoid NPE when clearing a region flag - #2307

Open
HP-network wants to merge 1 commit into
EngineHub:version/7.0.xfrom
HP-network:codex/fix-region-flag-none-feedback
Open

HP-network wants to merge 1 commit into
EngineHub:version/7.0.xfrom
HP-network:codex/fix-region-flag-none-feedback

Conversation

@HP-network

Copy link
Copy Markdown

When a state flag is set to none, parsing intentionally returns null after clearing the flag. The command feedback path called toString() on that value, so the command completed but logged an NPE.

Keep the existing normalized output for non-null values and report none for the clear operation.

Fixes #2305

Tested with ./gradlew :worldguard-core:test.

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.

NullPointerException when setting flag to "none" in RegionCommands.setFlag

1 participant