Interface ClientReceiver

    • Method Detail

      • sendPacket

        void sendPacket​(Packet packet)
        Send the packet to the server
        Parameters:
        packet - the packet
      • registerPackHandler

        <T extends Packet> void registerPackHandler​(Plugin plugin,
                                                    Class<T> c,
                                                    PackHandler<T> packHandler)
        Register packet handler for server
        Type Parameters:
        T - the packet type
        Parameters:
        c - the packet class
        packHandler - the packet handler
        plugin - the plugin
      • getName

        String getName()
        Get the name of the client
        Returns:
        the name of the client
      • getHost

        String getHost()
        Get the target host of the client
        Returns:
        the target host of the client
      • getPort

        int getPort()
        Get the target port of the client
        Returns:
        the target port of the client
      • isConnected

        boolean isConnected()
        Indicate this client has connected to a server
        Returns:
        true if the client has connected to a server, false otherwise
      • getClientId

        int getClientId()
        Get the client id
        Returns:
        the client id
      • getClientToken

        String getClientToken()
        Get the client token
        Returns:
        the client token