BetterChairs
BetterChairs copied to clipboard
Add a /lay command
Is your feature request related to a problem? Please describe. I apologise if what I'm about to suggest is outside the scope of this plugin, but I was wondering if /lay could be implemented? There are a few other plugins that have /lay but they also come with their own /sit. I would prefer to use this plugin for /sit while also being able to use /lay.
Describe the solution you'd like A /lay command
Additional context
For example a plugin called gsit has a /lay command:
I did some testing and some research and this looks like a somewhat complicated matter – Especially in newer version (I tested in 1.19.2).
In case somebody wants to PR this or do some additional research:
- Apparently older Minecraft versions just have a Bed-Packet that can be send to everyone to fake the sleep animation
- There is
ServerPlayer#startSleeping
but it requires a bed (client side only?)- Maybe the coordinates of the bed do not have to match the player's?
- There is the
ClientboundSetEntityDataPacket
-Packet that might be used to send aPose.SLEEPING
- Has to be sent to all players that should see the given player/entity sleeping