Make player leave a bed with packet

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

May 2, 2020
1
0
1
23
Hello, I have used packet to make a player sleep inside a bed but the player can't leave the bed with button
what is the packet to use ?

I have used this function to force the player to sleep.

  1. function packetBedAnimation(player: player, bed: location):
  2. set {_packet} to new play_server_bed packet
  3. set location pinfo 0 of {_packet} to {_bed}
  4. set {_player}'s world pentity 0 of {_packet} to {_player}
  5. send {_player} packet {_packet}

Sorry for my bad English