mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
21 lines
587 B
Kotlin
21 lines
587 B
Kotlin
package net.torvald.terrarum.modulebasegame.console
|
|
|
|
import net.torvald.terrarum.Terrarum
|
|
import net.torvald.terrarum.console.ConsoleCommand
|
|
import net.torvald.terrarum.console.Echo
|
|
import net.torvald.terrarum.modulebasegame.Ingame
|
|
|
|
/**
|
|
* Created by minjaesong on 2016-03-20.
|
|
*/
|
|
internal object GetTime : ConsoleCommand {
|
|
override fun execute(args: Array<String>) {
|
|
|
|
val worldTime = (Terrarum.ingame!! as Ingame).world.time
|
|
Echo(worldTime.getFormattedTime())
|
|
}
|
|
|
|
override fun printUsage() {
|
|
Echo("Print current world time in convenient form")
|
|
}
|
|
} |