Skip to content

Commit 8cfcf05

Browse files
committed
Removed plugin artifacts
1 parent 5d55e78 commit 8cfcf05

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

common/src/main/kotlin/com/lambda/command/CommandRegistry.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@ package com.lambda.command
33
import com.lambda.config.Configurable
44
import com.lambda.config.configurations.LambdaConfig
55
import com.lambda.core.Loadable
6+
import com.lambda.module.Module
7+
import com.lambda.module.ModuleRegistry
8+
import com.lambda.module.ModuleRegistry.modules
69
import org.reflections.Reflections
710
import org.reflections.scanners.Scanners
811
import org.reflections.util.ConfigurationBuilder
912

13+
/**
14+
* The [CommandRegistry] object is responsible for managing all [LambdaCommand] instances in the system.
15+
*/
1016
object CommandRegistry : Configurable(LambdaConfig), Loadable {
1117
override val name = "command"
1218

1319
val prefix by setting("prefix", ';')
1420
val commands = mutableSetOf<LambdaCommand>()
1521

16-
private val paths = mutableSetOf("com.lambda.command.commands")
17-
18-
fun injectPath(path: String) = paths.add(path)
19-
2022
override fun load(): String {
2123
Reflections(
2224
ConfigurationBuilder()
23-
.forPackages(*paths.toTypedArray())
25+
.forPackage("com.lambda.command.commands")
2426
.setScanners(Scanners.SubTypes)
2527
).getSubTypesOf(LambdaCommand::class.java).forEach { commandClass ->
2628
commandClass.declaredFields.find {

common/src/main/kotlin/com/lambda/module/ModuleRegistry.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,17 @@ import org.reflections.util.ConfigurationBuilder
88

99
/**
1010
* The [ModuleRegistry] object is responsible for managing all [Module] instances in the system.
11-
*
12-
* @property modules A set of all [Module] instances in the system.
1311
*/
1412
object ModuleRegistry : Loadable {
1513
val modules = mutableSetOf<Module>()
1614

1715
val moduleNames: Set<String>
1816
get() = modules.map { it.name }.toSet()
1917

20-
private val paths = mutableSetOf("com.lambda.module.modules")
21-
22-
fun injectPath(path: String) = paths.add(path)
23-
2418
override fun load(): String {
2519
Reflections(
2620
ConfigurationBuilder()
27-
.forPackages(*paths.toTypedArray())
21+
.forPackages("com.lambda.module.modules")
2822
.addScanners(Scanners.SubTypes)
2923
).getSubTypesOf(Module::class.java).forEach { moduleClass ->
3024
moduleClass.declaredFields.find {

0 commit comments

Comments
 (0)