Skip to content

Commit a8b4c33

Browse files
committed
detekt
1 parent dc02d24 commit a8b4c33

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

instances/bukkit/src/main/kotlin/ru/astrainteractive/astratemplate/command/errorhandler/DefaultErrorHandler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ internal class DefaultErrorHandler(
2727
when (throwable) {
2828
is AddItemCommand.Error -> {
2929
when (throwable) {
30-
AddItemCommand.Error.ItemNotfound -> {
30+
is AddItemCommand.Error.ItemNotfound -> {
3131
ctx.source.sender.sendMessage(translation.fault.itemNotFound.component)
3232
}
3333

34-
AddItemCommand.Error.SenderNotPlayer -> {
34+
is AddItemCommand.Error.SenderNotPlayer -> {
3535
ctx.source.sender.sendMessage(translation.fault.notPlayer.component)
3636
}
3737
}

instances/bukkit/src/main/kotlin/ru/astrainteractive/astratemplate/di/RootModule.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ internal class RootModule(plugin: AstraTemplate) {
2828
val apiRemoteModule: ApiRemoteModule = ApiRemoteModule()
2929

3030
val eventModule: EventModule = EventModule(this)
31-
32-
val commandModule: CommandModule = CommandModule.Default(this)
33-
3431
val guiModule: GuiModule = GuiModule(
3532
coreModule = coreModule,
3633
bukkitModule = bukkitModule,
3734
apiLocalModule = apiLocalModule
3835
)
36+
val commandModule: CommandModule = CommandModule(
37+
coreModule = coreModule,
38+
bukkitModule = bukkitModule,
39+
apiRemoteModule = apiRemoteModule,
40+
guiModule = guiModule
41+
)
42+
3943
private val lifecycles: List<Lifecycle>
4044
get() = listOf(
4145
coreModule.lifecycle,
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
package ru.astrainteractive.astratemplate.di
22

33
import ru.astrainteractive.astratemplate.core.di.CoreModule
4+
import ru.astrainteractive.klibs.mikro.core.dispatchers.DefaultKotlinDispatchers
5+
46
class RootModule {
57
val velocityModule = VelocityModule()
68

79
val coreModule: CoreModule by lazy {
8-
CoreModule(velocityModule.dataDirectory.toFile())
10+
CoreModule(
11+
dataFolder = velocityModule.dataDirectory.toFile(),
12+
dispatchers = DefaultKotlinDispatchers
13+
)
914
}
1015
}

0 commit comments

Comments
 (0)