public abstract class IOHandler extends Object
| 构造器和说明 |
|---|
IOHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
static IOHandler |
getConsoleIoHandler() |
boolean |
hasInput()
Indicate there needs the MiraiCode of this input if it is a Mirai Message, or the string value of this input.
|
abstract boolean |
hasInput(boolean flag)
Indicate there needs an input String.
|
String |
input()
Used to get input String
|
void |
input(@Nullable String input)
Used to input String
|
abstract void |
output(String output)
Used to output String
|
void |
outputLang(String key,
Object... objects)
Used to output formatted language key
|
static void |
setConsoleIoHandler(IOHandler consoleIoHandler) |
protected volatile String value
protected volatile boolean flag
public static IOHandler getConsoleIoHandler()
public static void setConsoleIoHandler(IOHandler consoleIoHandler)
public abstract void output(String output)
output - output Stringpublic void outputLang(String key, Object... objects)
key - the language keypublic String input()
InputTimeoutException - if the command has waited for more than 10 minutes to get executor input stringpublic void input(@Nullable
@Nullable String input)
input - the inputted Stringpublic boolean hasInput()
hasInput(boolean)public abstract boolean hasInput(boolean flag)
flag - true if you need the MiraiCode of this input when it is a Mirai Message, false if you need the string value of this inputCopyright © 2022. All rights reserved.