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: essentials.home.bed & essentials.sethome.bed permissions #5991

Open
wants to merge 4 commits into
base: 2.x
Choose a base branch
from

Conversation

Hunh0w
Copy link

@Hunh0w Hunh0w commented Dec 11, 2024

Information

This PR fixes #5963.

Details

Proposed fix:
If the player uses "/home bed" when he doesn't have the "essentials.home.bed" permission, he's getting a no permission error for it

Environments tested:

OS: Ubuntu 24.04.1 LTS

Java version: 21

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

Copy link
Member

@pop4959 pop4959 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for making your first PR to Essentials! We appreciate it.

I left a few comments for you to look at. Please also share proof of testing (show before/after screenshot is probably the easiest) in the demonstration section which you left blank.

Also, in the original issue, essentials.sethome.bed is mentioned. Have you checked if there is a problem with /sethome or is this working as intended?

@Hunh0w
Copy link
Author

Hunh0w commented Dec 12, 2024

Hey, thanks you too for your feedback ! ^^
I updated this PR according to your comments.

I added a fix for the essentials.sethome.bed there was a problem, we couldn't prevent player from setting his bed position even with this permission to false

Screenshots of the before behaviour:
Capture d’écran du 2024-12-12 09-03-19
Capture d’écran du 2024-12-12 10-11-26

Screenshots of the after behaviour:
Capture d’écran du 2024-12-12 10-09-24
no_bed_perm_result

For the bed sethome, if we don't have the permission it doesn't produce anything, maybe i should add an error message in this case ?

@Hunh0w Hunh0w changed the title fix: essentials.home.bed permission fix: essentials.home.bed & essentials.sethome.bed permissions Dec 12, 2024
@Hunh0w Hunh0w requested a review from pop4959 December 12, 2024 09:33
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.

The "essentials.home.bed" permission is ignored
2 participants