Interface IPacket

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      byte[] getBodyAsArray()  
      ProtocolBuffer getBuffer()
      Returns the packet body, for transport for extra data, like files or zip archives or something else
      int getChannel()
      Returns the channel id, in that the IPacketListenerRegistry class should the listeners work with that packet
      long getCreationMillis()  
      de.dytanic.cloudnet.common.document.gson.JsonDocument getHeader()
      The header, contain all important information from the packet, to specify the packet type as channel does and/or can has the data, which that are important to handle with
      @NotNull java.util.UUID getUniqueId()
      Returns the uuid of the packet.
      default boolean isShowDebug()  
    • Method Detail

      • getUniqueId

        @NotNull
        @NotNull java.util.UUID getUniqueId()
        Returns the uuid of the packet. Each packet should has a own defined UUID instance, less the callback packets for synchronized messages between client and server
        Returns:
        the own uniqueId
      • getChannel

        int getChannel()
        Returns the channel id, in that the IPacketListenerRegistry class should the listeners work with that packet
        Returns:
        the channel id in that the packet is defined
      • getHeader

        de.dytanic.cloudnet.common.document.gson.JsonDocument getHeader()
        The header, contain all important information from the packet, to specify the packet type as channel does and/or can has the data, which that are important to handle with

        The encoding should be UTF-8

        Returns:
        the header as JsonDocument instance from this packet
      • getBuffer

        ProtocolBuffer getBuffer()
        Returns the packet body, for transport for extra data, like files or zip archives or something else
        Returns:
        the body as a ProtocolBuffer
      • getBodyAsArray

        byte[] getBodyAsArray()
        Returns:
        the body as a byte array
      • getCreationMillis

        long getCreationMillis()
        Returns:
        the creation milliseconds of this packet
      • isShowDebug

        default boolean isShowDebug()
        Returns:
        if there should be debug messages for this type of packet