Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: permission check for integer flags #4217

Merged

Conversation

RedstoneFuture
Copy link
Member

@RedstoneFuture RedstoneFuture commented Oct 26, 2023

Overview

Commands like /p f s mob-cap 0 are now allowed, if the player hast the permission plots.set.flag.mob-cap.0 ore higher. Zero is not a valid range for the permission check.

Fixes #3896

Description

  • Changing integer check to allow zero
  • Adding small comments to describe the complicated algorithm
  • Adding details to the max-plots setting description as it stands for more than just the plot-maximum (probably historically formed)

The permission check was tested in-game.

Submitter Checklist

@RedstoneFuture RedstoneFuture requested a review from a team as a code owner October 26, 2023 19:49
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Oct 26, 2023
@RedstoneFuture RedstoneFuture changed the title Fix permission check for integer flags Fix: permission check for integer flags Oct 28, 2023
@dordsor21 dordsor21 merged commit ba78802 into IntellectualSites:main Nov 21, 2023
9 checks passed
@RedstoneFuture RedstoneFuture deleted the fix/integer-flag-permissions branch November 21, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong permission check for mob-cap flag
3 participants