Package de.dytanic.cloudnet.console
Class JLine3Console
- java.lang.Object
-
- de.dytanic.cloudnet.console.JLine3Console
-
-
Constructor Summary
Constructors Constructor Description JLine3Console()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommandHandler(@NotNull java.util.UUID uniqueId, @NotNull java.util.function.Consumer<java.lang.String> inputConsumer)voidaddTabCompletionHandler(@NotNull java.util.UUID uniqueId, @NotNull ITabCompleter completer)voidclearScreen()voidclose()voiddisableAllCommandHandlers()voiddisableAllHandlers()voiddisableAllTabCompletionHandlers()voidemptyPrompt()voidenableAllCommandHandlers()voidenableAllHandlers()voidenableAllTabCompletionHandlers()@NotNull IConsoleforceWrite(@NotNull java.lang.String text)@NotNull IConsoleforceWriteLine(@NotNull java.lang.String text)@NotNull java.util.List<java.lang.String>getCommandHistory()protected @NotNull java.util.Map<java.util.UUID,ConsoleHandler<java.util.function.Consumer<java.lang.String>>>getConsoleInputHandler()protected @NotNull org.jline.reader.LineReadergetLineReader()@NotNull java.lang.StringgetPrompt()@NotNull java.util.Collection<AbstractConsoleAnimation>getRunningAnimations()@NotNull java.lang.StringgetScreenName()protected @NotNull java.util.Collection<ITabCompleter>getTabCompletionHandler()booleanhasColorSupport()booleanisAnimationRunning()booleanisPrintingEnabled()booleanisUsingMatchingHistoryComplete()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.String>readLine()voidremoveCommandHandler(@NotNull java.util.UUID uniqueId)voidremovePrompt()voidremoveTabCompletionHandler(@NotNull java.util.UUID uniqueId)voidresetPrompt()voidsetCommandHistory(java.util.List<java.lang.String> history)voidsetCommandInputValue(@NotNull java.lang.String commandInputValue)voidsetPrompt(@NotNull java.lang.String prompt)voidsetScreenName(@NotNull java.lang.String screenName)voidsetUsingMatchingHistoryComplete(boolean matchingHistoryComplete)voidstartAnimation(@NotNull AbstractConsoleAnimation animation)voidtogglePrinting(boolean enabled)@NotNull IConsolewrite(@NotNull java.lang.String text)@NotNull IConsolewriteLine(@NotNull java.lang.String text)@NotNull IConsolewriteRaw(@NotNull java.lang.String rawText)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.dytanic.cloudnet.console.IConsole
hasAnimationSupport
-
-
-
-
Method Detail
-
getRunningAnimations
@NotNull public @NotNull java.util.Collection<AbstractConsoleAnimation> getRunningAnimations()
- Specified by:
getRunningAnimationsin interfaceIConsole
-
startAnimation
public void startAnimation(@NotNull @NotNull AbstractConsoleAnimation animation)- Specified by:
startAnimationin interfaceIConsole
-
isAnimationRunning
public boolean isAnimationRunning()
- Specified by:
isAnimationRunningin interfaceIConsole
-
togglePrinting
public void togglePrinting(boolean enabled)
- Specified by:
togglePrintingin interfaceIConsole
-
isPrintingEnabled
public boolean isPrintingEnabled()
- Specified by:
isPrintingEnabledin interfaceIConsole
-
getCommandHistory
@NotNull public @NotNull java.util.List<java.lang.String> getCommandHistory()
- Specified by:
getCommandHistoryin interfaceIConsole
-
setCommandHistory
public void setCommandHistory(java.util.List<java.lang.String> history)
- Specified by:
setCommandHistoryin interfaceIConsole
-
setCommandInputValue
public void setCommandInputValue(@NotNull @NotNull java.lang.String commandInputValue)- Specified by:
setCommandInputValuein interfaceIConsole
-
readLine
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.String> readLine()
-
enableAllHandlers
public void enableAllHandlers()
- Specified by:
enableAllHandlersin interfaceIConsole
-
disableAllHandlers
public void disableAllHandlers()
- Specified by:
disableAllHandlersin interfaceIConsole
-
enableAllTabCompletionHandlers
public void enableAllTabCompletionHandlers()
- Specified by:
enableAllTabCompletionHandlersin interfaceIConsole
-
disableAllTabCompletionHandlers
public void disableAllTabCompletionHandlers()
- Specified by:
disableAllTabCompletionHandlersin interfaceIConsole
-
enableAllCommandHandlers
public void enableAllCommandHandlers()
- Specified by:
enableAllCommandHandlersin interfaceIConsole
-
disableAllCommandHandlers
public void disableAllCommandHandlers()
- Specified by:
disableAllCommandHandlersin interfaceIConsole
-
addCommandHandler
public void addCommandHandler(@NotNull @NotNull java.util.UUID uniqueId, @NotNull @NotNull java.util.function.Consumer<java.lang.String> inputConsumer)- Specified by:
addCommandHandlerin interfaceIConsole
-
removeCommandHandler
public void removeCommandHandler(@NotNull @NotNull java.util.UUID uniqueId)- Specified by:
removeCommandHandlerin interfaceIConsole
-
addTabCompletionHandler
public void addTabCompletionHandler(@NotNull @NotNull java.util.UUID uniqueId, @NotNull @NotNull ITabCompleter completer)- Specified by:
addTabCompletionHandlerin interfaceIConsole
-
removeTabCompletionHandler
public void removeTabCompletionHandler(@NotNull @NotNull java.util.UUID uniqueId)- Specified by:
removeTabCompletionHandlerin interfaceIConsole
-
write
@NotNull public @NotNull IConsole write(@NotNull @NotNull java.lang.String text)
-
writeLine
@NotNull public @NotNull IConsole writeLine(@NotNull @NotNull java.lang.String text)
-
forceWrite
@NotNull public @NotNull IConsole forceWrite(@NotNull @NotNull java.lang.String text)
- Specified by:
forceWritein interfaceIConsole
-
writeRaw
@NotNull public @NotNull IConsole writeRaw(@NotNull @NotNull java.lang.String rawText)
-
forceWriteLine
@NotNull public @NotNull IConsole forceWriteLine(@NotNull @NotNull java.lang.String text)
- Specified by:
forceWriteLinein interfaceIConsole
-
hasColorSupport
public boolean hasColorSupport()
- Specified by:
hasColorSupportin interfaceIConsole
-
isUsingMatchingHistoryComplete
public boolean isUsingMatchingHistoryComplete()
- Specified by:
isUsingMatchingHistoryCompletein interfaceIConsole
-
setUsingMatchingHistoryComplete
public void setUsingMatchingHistoryComplete(boolean matchingHistoryComplete)
- Specified by:
setUsingMatchingHistoryCompletein interfaceIConsole
-
resetPrompt
public void resetPrompt()
- Specified by:
resetPromptin interfaceIConsole
-
removePrompt
public void removePrompt()
- Specified by:
removePromptin interfaceIConsole
-
emptyPrompt
public void emptyPrompt()
- Specified by:
emptyPromptin interfaceIConsole
-
clearScreen
public void clearScreen()
- Specified by:
clearScreenin interfaceIConsole
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getPrompt
@NotNull public @NotNull java.lang.String getPrompt()
-
setPrompt
public void setPrompt(@NotNull @NotNull java.lang.String prompt)
-
getScreenName
@NotNull public @NotNull java.lang.String getScreenName()
- Specified by:
getScreenNamein interfaceIConsole
-
setScreenName
public void setScreenName(@NotNull @NotNull java.lang.String screenName)- Specified by:
setScreenNamein interfaceIConsole
-
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()
-
-