Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Add config option and/or permission for ignoring monsters nearby to sleep

Open Andre601 opened this issue 5 years ago • 6 comments

Feature request

Feature description

It would be nice, if there was a config option and/or permission to ignore the "You may not sleep now. Thee are monsters nearby." issue.

How the feature is useful

It can become annoying if you want to sleep to make it day, but one can't because there are monsters somewhere that can't be found.

Andre601 avatar Oct 15 '20 06:10 Andre601

This doesn't seem like something Essentials can override (I believe).

Chew avatar Oct 15 '20 18:10 Chew

This doesn't seem like something Essentials can override (I believe).

From a small chat on the M.O.S.S. Discord does it seem that there is a method to set a players sleeping state and such.

Andre601 avatar Oct 15 '20 22:10 Andre601

I don't believe this is exposed in such a way that Essentials would be able to do anything about it. You'll probably have better luck asking Spigot/Paper to add this option to the server.

pop4959 avatar Oct 23 '20 01:10 pop4959

It would be possible - you would just check the time of day on a right click on a bed... you wouldn't get in the bed, but it could still work

the-mann avatar Nov 02 '20 02:11 the-mann

@the-mann Feel free to make a PR if you know how to do it, or point out the specific APIs that make it possible.

pop4959 avatar Nov 02 '20 03:11 pop4959

AFAIK setting setUseBed(Event.Result.ALLOW) in PlayerBedEnterEvent should work, but i haven't tested it myself.

cype-dev avatar Dec 07 '20 19:12 cype-dev