Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a /lay command #150

Open
SecretlyJealous opened this issue Jul 25, 2022 · 1 comment
Open

Add a /lay command #150

SecretlyJealous opened this issue Jul 25, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SecretlyJealous
Copy link

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:
image

@SpraxDev SpraxDev added the enhancement New feature or request label Aug 24, 2022
@SpraxDev
Copy link
Owner

SpraxDev commented Aug 24, 2022

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 a Pose.SLEEPING
    • Has to be sent to all players that should see the given player/entity sleeping

@SpraxDev SpraxDev added the help wanted Extra attention is needed label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants