Class JLine3Console

  • All Implemented Interfaces:
    IConsole, java.lang.AutoCloseable

    public final class JLine3Console
    extends java.lang.Object
    implements IConsole
    • Constructor Detail

      • JLine3Console

        public JLine3Console()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • togglePrinting

        public void togglePrinting​(boolean enabled)
        Specified by:
        togglePrinting in interface IConsole
      • getCommandHistory

        @NotNull
        public @NotNull java.util.List<java.lang.String> getCommandHistory()
        Specified by:
        getCommandHistory in interface IConsole
      • setCommandHistory

        public void setCommandHistory​(java.util.List<java.lang.String> history)
        Specified by:
        setCommandHistory in interface IConsole
      • setCommandInputValue

        public void setCommandInputValue​(@NotNull
                                         @NotNull java.lang.String commandInputValue)
        Specified by:
        setCommandInputValue in interface IConsole
      • readLine

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.String> readLine()
        Specified by:
        readLine in interface IConsole
      • addCommandHandler

        public void addCommandHandler​(@NotNull
                                      @NotNull java.util.UUID uniqueId,
                                      @NotNull
                                      @NotNull java.util.function.Consumer<java.lang.String> inputConsumer)
        Specified by:
        addCommandHandler in interface IConsole
      • removeCommandHandler

        public void removeCommandHandler​(@NotNull
                                         @NotNull java.util.UUID uniqueId)
        Specified by:
        removeCommandHandler in interface IConsole
      • removeTabCompletionHandler

        public void removeTabCompletionHandler​(@NotNull
                                               @NotNull java.util.UUID uniqueId)
        Specified by:
        removeTabCompletionHandler in interface IConsole
      • write

        @NotNull
        public @NotNull IConsole write​(@NotNull
                                       @NotNull java.lang.String text)
        Specified by:
        write in interface IConsole
      • writeLine

        @NotNull
        public @NotNull IConsole writeLine​(@NotNull
                                           @NotNull java.lang.String text)
        Specified by:
        writeLine in interface IConsole
      • forceWrite

        @NotNull
        public @NotNull IConsole forceWrite​(@NotNull
                                            @NotNull java.lang.String text)
        Specified by:
        forceWrite in interface IConsole
      • writeRaw

        @NotNull
        public @NotNull IConsole writeRaw​(@NotNull
                                          @NotNull java.lang.String rawText)
        Specified by:
        writeRaw in interface IConsole
      • forceWriteLine

        @NotNull
        public @NotNull IConsole forceWriteLine​(@NotNull
                                                @NotNull java.lang.String text)
        Specified by:
        forceWriteLine in interface IConsole
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • getPrompt

        @NotNull
        public @NotNull java.lang.String getPrompt()
        Specified by:
        getPrompt in interface IConsole
      • setPrompt

        public void setPrompt​(@NotNull
                              @NotNull java.lang.String prompt)
        Specified by:
        setPrompt in interface IConsole
      • getScreenName

        @NotNull
        public @NotNull java.lang.String getScreenName()
        Specified by:
        getScreenName in interface IConsole
      • setScreenName

        public void setScreenName​(@NotNull
                                  @NotNull java.lang.String screenName)
        Specified by:
        setScreenName in interface IConsole
      • getLineReader

        @NotNull
        @Internal
        protected @NotNull org.jline.reader.LineReader getLineReader()
      • getConsoleInputHandler

        @NotNull
        @Internal
        protected @NotNull java.util.Map<java.util.UUID,​ConsoleHandler<java.util.function.Consumer<java.lang.String>>> getConsoleInputHandler()
      • getTabCompletionHandler

        @NotNull
        @Internal
        protected @NotNull java.util.Collection<ITabCompleter> getTabCompletionHandler()