From eae715231bb8eb8146203f0b2da42d2a8d1cd122 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 2 Apr 2020 19:13:38 +0100 Subject: [PATCH] Move subcommands to init block for consistency Signed-off-by: Graham --- all/src/main/java/dev/openrs2/Command.kt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/all/src/main/java/dev/openrs2/Command.kt b/all/src/main/java/dev/openrs2/Command.kt index 8ec02531..7f2d5619 100644 --- a/all/src/main/java/dev/openrs2/Command.kt +++ b/all/src/main/java/dev/openrs2/Command.kt @@ -10,17 +10,21 @@ import dev.openrs2.deob.DeobfuscateCommand import dev.openrs2.deob.ast.DeobfuscateAstCommand import dev.openrs2.game.GameCommand -fun main(args: Array) = Command().subcommands( - BundleCommand(), - CompressCommand(), - Crc32Command(), - DecompileCommand(), - DeobfuscateCommand(), - DeobfuscateAstCommand(), - GameCommand() -).main(args) +fun main(args: Array) = Command().main(args) class Command : CliktCommand(name = "openrs2") { + init { + subcommands( + BundleCommand(), + CompressCommand(), + Crc32Command(), + DecompileCommand(), + DeobfuscateCommand(), + DeobfuscateAstCommand(), + GameCommand() + ) + } + override fun run() { // empty }