Class WrapperPlayServerAttachEntity

java.lang.Object
com.github.retrooper.packetevents.wrapper.PacketWrapper<WrapperPlayServerAttachEntity>
com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerAttachEntity

public class WrapperPlayServerAttachEntity extends PacketWrapper<WrapperPlayServerAttachEntity>
  • Constructor Details

    • WrapperPlayServerAttachEntity

      public WrapperPlayServerAttachEntity(PacketSendEvent event)
    • WrapperPlayServerAttachEntity

      public WrapperPlayServerAttachEntity(int attachedId, int holdingId, boolean leash)
  • Method Details

    • read

      public void read()
      Overrides:
      read in class PacketWrapper<WrapperPlayServerAttachEntity>
    • write

      public void write()
      Overrides:
      write in class PacketWrapper<WrapperPlayServerAttachEntity>
    • copy

      public void copy(WrapperPlayServerAttachEntity wrapper)
      Overrides:
      copy in class PacketWrapper<WrapperPlayServerAttachEntity>
    • getAttachedId

      public int getAttachedId()
      Returns:
      entity being leashed or the passenger
    • setAttachedId

      public void setAttachedId(int attachedId)
      Parameters:
      attachedId - entity being leashed or the passenger
    • getHoldingId

      public int getHoldingId()
      Returns:
      entity holding the leash or the vehicle
    • setHoldingId

      public void setHoldingId(int holdingId)
      Parameters:
      holdingId - entity holding the leash or the vehicle
    • isLeash

      public boolean isLeash()
      Returns:
      true if leashing instead of mounting always true for 1.9 and above, due to SetPassengers replacing this packet
      See Also:
    • setLeash

      public void setLeash(boolean leash)
      Only affects 1.8 and below servers
      Parameters:
      leash - whether packet indicates leashing instead of mounting