Add config option and/or permission for ignoring monsters nearby to sleep
Andre601 opened this issue ยท 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.
AFAIK setting setUseBed(Event.Result.ALLOW) in PlayerBedEnterEvent should work, but i haven't tested it myself.
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.
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.
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 Feel free to make a PR if you know how to do it, or point out the specific APIs that make it possible.