What is the best way to set a bed in Minecraft via a plugin?

Li
- in Plugins
3

I have a question and although I wanted to put a bed, but this is a plugin in the Minecraft version 1.14.4 I put the bed but it is only the bottom of the bed set how do I set the upper side?

Ba

It is very very complicated and verbuggt. I would do it manually (so just place the item).

Li

Yes, I did not want to put it on a BedWars plugin myself.

Li

There's so ne class called Bed and there you can set the part (Foot, HEAD) but I did not know how to handle it