Re-create dying scene

Discussion in 'Spigot Plugin Development' started by PockedMC, May 17, 2017.

  1. How would I go about making the dying scene of a player (when the player goes red and falls over) only for one player?

    Nothing would happen to the player but for a certain player they will 'die' and disappear using hidePlayer

    I know how to hide the player but how to recreate the death scene?
     
  2. http://wiki.vg/Protocol#Entity_Status
    [​IMG]
     
  3. "PacketPlayOutEntityStatus" is just a status update / modify packet that don't require locations, only the Entity ( nms ) & the ( byte ) status id.
     
  4. So how would I show 't' being killed to only 'p' @Phloxz
     
  5. o_O Serios?
    Ok,

    Code (Text):

    ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
     
     
  6. @Phloxz But how do I define which player I want to 'die'
     
  7. I already told you this, but here you go again with a more detailed information:

    Code (Text):


    PacketPlayOutEntityStatus status = new PacketPlayOutEntityStatus(((CraftPlayer)YOUR_DEAD_PLAYER).getHandle(),(byte)3);

    ((CraftPlayer)WHO_SHOULD_SEE_THE_STATUS).getHandle().playerConnection.sendPacket(status);