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

/plot grant add <name> doesn't send success message #4383

Open
NotMyFault opened this issue Mar 31, 2024 · 0 comments
Open

/plot grant add <name> doesn't send success message #4383

NotMyFault opened this issue Mar 31, 2024 · 0 comments
Labels
Approved A project maintainer or developer has reproduced this issue Bug Something isn't working Good first issue Simple issue which would be a good first PR for newbies interested in contributing to the project

Comments

@NotMyFault
Copy link
Member

player.sendMessage(
TranslatableCaption.of("grants.added"),
TagResolver.resolver("grants", Tag.inserting(Component.text(amount)))

sends the success message, but commonly, you don't reach the else block, unless pp == null, which isn't the case, normally.
We could move the message to the line below
access.set(access.get().orElse(0) + 1);

where the actual grant is added to the player.

@NotMyFault NotMyFault added Bug Something isn't working Approved A project maintainer or developer has reproduced this issue Good first issue Simple issue which would be a good first PR for newbies interested in contributing to the project labels Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved A project maintainer or developer has reproduced this issue Bug Something isn't working Good first issue Simple issue which would be a good first PR for newbies interested in contributing to the project
Projects
None yet
Development

No branches or pull requests

1 participant