@@ -12,21 +12,24 @@ class SubMarket(val plugin: AQQBot) : ACommand {
1212 sender.sendMessage(Component .text(" 你没有权限使用此命令!" , NamedTextColor .RED ))
1313 return
1414 }
15- when (args[1 ]) {
16- " list" -> plugin.scriptLoader.marketManager.list(sender)
17- " info" -> if (args.size == 3 ) {
18- plugin.scriptLoader.marketManager.info(sender, args[2 ], null )
19- } else if (args.size == 4 ) {
20- plugin.scriptLoader.marketManager.info(sender, args[2 ], args[3 ])
21- } else SubHelp (plugin).onCommand(command, sender, args)
22- " install" -> if (args.size == 3 ) {
23- plugin.scriptLoader.marketManager.install(sender, args[2 ], null )
24- } else if (args.size == 4 ) {
25- plugin.scriptLoader.marketManager.install(sender, args[2 ], args[3 ])
26- } else SubHelp (plugin).onCommand(command, sender, args)
27- " update" -> if (args.size == 3 ) {
28- plugin.scriptLoader.marketManager.update(sender, args[2 ])
29- } else SubHelp (plugin).onCommand(command, sender, args)
15+ plugin.submitAsync {
16+ when (args[1 ]) {
17+ " list" -> plugin.scriptLoader.marketManager.list(sender)
18+ " info" -> if (args.size == 3 ) {
19+ plugin.scriptLoader.marketManager.info(sender, args[2 ], null )
20+ } else if (args.size == 4 ) {
21+ plugin.scriptLoader.marketManager.info(sender, args[2 ], args[3 ])
22+ } else SubHelp (plugin).onCommand(command, sender, args)
23+ " install" -> if (args.size == 3 ) {
24+ plugin.scriptLoader.marketManager.install(sender, args[2 ], null )
25+ } else if (args.size == 4 ) {
26+ plugin.scriptLoader.marketManager.install(sender, args[2 ], args[3 ])
27+ } else SubHelp (plugin).onCommand(command, sender, args)
28+ " update" -> if (args.size == 3 ) {
29+ plugin.scriptLoader.marketManager.update(sender, args[2 ])
30+ } else SubHelp (plugin).onCommand(command, sender, args)
31+ else -> SubHelp (plugin).onCommand(command, sender, args)
32+ }
3033 }
3134 }
3235
0 commit comments