Class AbstractCommand

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractCommand​(@NotNull java.lang.String commandName, @NotNull CrossfireServerConnection crossfireServerConnection)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void drawInfo​(@NotNull java.lang.String message)
      Displays a regular output message.
      protected void drawInfo​(@NotNull java.lang.String message, int color)
      Displays a message.
      protected void drawInfoError​(@NotNull java.lang.String message)
      Displays an error message.
      @NotNull java.lang.String getCommandName()
      Returns the name of the command.
      @NotNull java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractCommand

        protected AbstractCommand​(@NotNull
                                  @NotNull java.lang.String commandName,
                                  @NotNull
                                  @NotNull CrossfireServerConnection crossfireServerConnection)
        Creates a new instance.
        Parameters:
        commandName - the name of the command
        crossfireServerConnection - the connection instance
    • Method Detail

      • drawInfo

        protected void drawInfo​(@NotNull
                                @NotNull java.lang.String message)
        Displays a regular output message.
        Parameters:
        message - the message
      • drawInfoError

        protected void drawInfoError​(@NotNull
                                     @NotNull java.lang.String message)
        Displays an error message.
        Parameters:
        message - the error message
      • drawInfo

        protected void drawInfo​(@NotNull
                                @NotNull java.lang.String message,
                                int color)
        Displays a message.
        Parameters:
        message - the message
        color - the color code
      • getCommandName

        @NotNull
        public @NotNull java.lang.String getCommandName()
        Description copied from interface: Command
        Returns the name of the command.
        Specified by:
        getCommandName in interface Command
        Returns:
        the name
      • toString

        @NotNull
        public @NotNull java.lang.String toString()
        Overrides:
        toString in class java.lang.Object