mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 05:24:06 +09:00
new console command 'error' (stderr equivalent of console window)
Former-commit-id: ab54663fd64f9ae9c758f53b3f5800a5894f0db3 Former-commit-id: 7aba1585ffa45195622bb25e1c62cace474420c9
This commit is contained in:
@@ -18,6 +18,7 @@ class GetAV : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
val echo = Echo()
|
||||
val error = Error()
|
||||
|
||||
try {
|
||||
if (args.size == 1) {
|
||||
@@ -87,11 +88,11 @@ class GetAV : ConsoleCommand {
|
||||
}
|
||||
catch (e: NullPointerException) {
|
||||
if (args.size == 2) {
|
||||
echo.error(args[1] + ": actor value does not exist.")
|
||||
error.execute(args[1] + ": actor value does not exist.")
|
||||
System.err.println("[GetAV] ${args[1]}: actor value does not exist.")
|
||||
}
|
||||
else if (args.size == 3) {
|
||||
echo.error(args[2] + ": actor value does not exist.")
|
||||
error.execute(args[2] + ": actor value does not exist.")
|
||||
System.err.println("[GetAV] ${args[2]}: actor value does not exist.")
|
||||
}
|
||||
else {
|
||||
@@ -99,7 +100,7 @@ class GetAV : ConsoleCommand {
|
||||
}
|
||||
}
|
||||
catch (e1: IllegalArgumentException) {
|
||||
echo.error("${args[1]}: no actor with this ID.")
|
||||
error.execute("${args[1]}: no actor with this ID.")
|
||||
System.err.println("[GetAV] ${args[1]}: no actor with this ID.")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user