This is a discussion topic for the Ore project, lieDown. View the full project on Ore for downloads and more information.
Lie Down
A plugin that simply make sponge:human lie down
Commands
Use it is straightforward
# make the human entity lie down or wake up
/liedown <command selector>|<human entity id> [boolean]
Permissions
me.mmis1000.liedown # who can execute the command
Use it as an API in another plugin
import me.mmis1000.lieDown.data.DataLieDown
human.offer(DataLieDown.key, true) // make it lie down
human.offer(DataLieDown.key, false) // make it wake up
Warning (minecraft 1.12.*)
Vanilla only render it correctly when the human is on a block shorter than one block and have four direction due to a bug.
Forge itself patch that up.
Please don’t make human lie on non-partial-height
or non-four-way-directional
block when your server has player join with vanilla client.