Skip to content

Conversation

@gamecrash534
Copy link

Overview

This PR relates to an issue where a player cannot list all plot flags available if he isn't on a plot where he has permissions to change them.

Description

As said in the overview, this PR aims to solve the issue of a player not being able to use /plot flag list if he does not meet the requirement of standing on a plot where he has permission to change these flags. The idea behind this issue being that a player should be able to view the list of flags regardless of permission to change them - as one might be on a plot of another player and wants to find the correct flag to do XY, e.g. to help him out. This eliminates the need to visit / google the documentation or go to a own plot just to enter this command and view the available flags. It still, though, needs the plots.flag.list-permission to be executed.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@gamecrash534 gamecrash534 requested a review from a team as a code owner August 31, 2025 22:25
@SirYwell
Copy link
Member

SirYwell commented Sep 1, 2025

From my understanding, the plots.flag.list permission allows to use the command on all plots, while without the permission, using it isn't even allowed on the own plot, right?
In that case, I think we should rather add another permission (e.g. plots.flag.list.other). Without that permission, checkRequirements should still be called. This way, it is possible to control whether the user can run the command on other plots too.

@gamecrash534
Copy link
Author

Currently the permission only allows you to list the flags when you're on a plot where you have permission to change them (e.g. a plot owner). But adding a new permission for this also seems like the best approach, yes. I can also implement this, as it shouldn't be that hard

… method by adding to-check permissions as a parameter
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.

2 participants