Class Command<T>

    • Field Detail

      • VOID_RESPONSE

        public static final Object VOID_RESPONSE
    • Constructor Detail

      • Command

        public Command()
    • Method Detail

      • getName

        public abstract String getName()
      • writeBody

        public abstract void writeBody​(CommandSender sender)
                                throws IOException
        Writes the body of the command.
        Parameters:
        sender - the sender used to send the command.
        Throws:
        IOException - if an I/O error occurs.
      • readResponseInternal

        protected abstract T readResponseInternal​(CommandReader reader)
                                           throws IOException
        Reads and returns the response from the reader.
        Parameters:
        reader - the reader used to read the response.
        Returns:
        the response.
        Throws:
        IOException - if an I/O error occurs.
      • isResponseReceived

        public boolean isResponseReceived()