Interface ProtocolInfo


  • public interface ProtocolInfo
    • Method Detail

      • getState

        State getState()
        Returns the protocol state the user is currently in.
        Returns:
        protocol state
      • setState

        void setState​(State state)
      • getProtocolVersion

        int getProtocolVersion()
        Returns the user's protocol version, or -1 if not set. This is set during the State.HANDSHAKE state.
        Returns:
        protocol version, or -1 if not set
      • setProtocolVersion

        void setProtocolVersion​(int protocolVersion)
      • getServerProtocolVersion

        int getServerProtocolVersion()
        Returns the server protocol version the user is connected to, or -1 if not set. This is set during the State.HANDSHAKE state.
        Returns:
        server protocol version, or -1 if not set
      • setServerProtocolVersion

        void setServerProtocolVersion​(int serverProtocolVersion)
      • getUsername

        @Nullable java.lang.String getUsername()
        Returns the username associated with this connection. This is set once the connection enters the State.PLAY state.
        Returns:
        username, set when entering the State.PLAY state
      • setUsername

        void setUsername​(java.lang.String username)
      • getUuid

        @Nullable java.util.UUID getUuid()
        Returns the uuid associated with this connection. This is set once the connection enters the State.PLAY state.
        Returns:
        uuid, set when entering the State.PLAY state
      • setUuid

        void setUuid​(java.util.UUID uuid)
      • getPipeline

        ProtocolPipeline getPipeline()
        Returns the user's pipeline.
        Returns:
        protocol pipeline
      • getUser

        UserConnection getUser()
        Returns the user connection this info represents.
        Returns:
        user connection