EssentialsX

EssentialsX

2M Downloads

Addition to the sleepingignored permission

Nuytemans-Dieter opened this issue ยท 6 comments

commented

Feature request

Backstory of this request
Hey! I'm the developer of a much smaller plugin called BetterSleeping. EssentialsX skips the night when all players in a world (except for the ones with permission node essentials.sleepingignored) are sleeping. I had to disable sleeping for players with this permission node as EssentialsX would skip the night otherwise in some cases. However, I am getting frequent questions on my Discord server where people are asking how they can be OP and still be allowed to sleep. They are generally not well-versed in permission handling plugins so I (or any of my beta testers or moderator) end up helping them with removing that specific permission quite often.

Feature description
I see two ways this would work equally well.

  1. Provide an option in some config file where (sleeping)ignored players can be enabled/disabled
  2. OPs don't get the node essentials.sleepingignored by default

How the feature is useful
It would help the users of my plugin and potentially other similar plugins as well. Sometimes these users just want to use a few plugins for a server with friends. Setting up permissions would be a bit overkill for them, but being able to point them to an option in a config file would be totally awesome.

Kind regards,
Dieter

commented

I see in the commit that you added it to the plugin.yml file. But it is not in the final versions. Is it on purpose? I have to manually add it there every time I update plugin. Last in 2.20.1.

commented

It seems as though dcb69dd and 12c8623 both added duplicate entries, and then in an attempt to remove the duplicate, both 97e3f32 and f6cb9ff removed each one without being aware of the other. One of these entries would need to be added back.

commented

I understand :)
But will you add it there again?

commented

I can see why this would be a problem for you, and it looks like Essentials doesn't have this permission set to default: false in plugin.yml, which would explain why this affects OPs in the way it does. I don't agree with adding any sort of configuration for this, since it would be pretty clowny to wrap a permission check in another config. So option 2 is probably better.

Feel free to make a PR if you wish to fix this. It shouldn't be a difficult change (in fact, just changing plugin.yml as I described above is probably enough). Main thing is you would need to test that Essentials and your (or other) sleep plugins continue to behave properly together.

Of course we don't live in an ideal world, but it would also be nice if server owners didn't so blindly grant the * and essentials.* permissions. Especially in a plugin like Essentials, which does many many things, this results in many surprises for server owners.

commented

Thank you for your reply. Now that I think of it, I agree with your reasoning. There is no need to add 'clutter' to the configuration.
I will probably make the pull request later today and see if everything still works fine.
Haha that's true, imagine if everyone read the documentation of a plugin before making any changes. How great would that be.

commented

Closed by dcb69dd.