EssentialsX

EssentialsX

2M Downloads

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

Andre601 opened this issue ยท 6 comments

commented

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.

commented

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

commented

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

commented

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.

commented

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.

commented

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

commented

@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.