Skip to content

Commit 95f1c4b

Browse files
committed
Command registering on server starting added.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 99e2a9c commit 95f1c4b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/core/impl/ModuleObject.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import com.mairwunnx.projectessentials.core.api.v1.helpers.projectConfigDirector
1313
import com.mairwunnx.projectessentials.core.api.v1.messaging.MessagingAPI
1414
import com.mairwunnx.projectessentials.core.api.v1.module.IModule
1515
import com.mairwunnx.projectessentials.core.api.v1.permissions.hasPermission
16-
import com.mairwunnx.projectessentials.core.api.v1.processor.ProcessorAPI
1716
import com.mairwunnx.projectessentials.core.impl.commands.ConfigureEssentialsCommandAPI
1817
import com.mairwunnx.projectessentials.core.impl.configurations.GeneralConfiguration
1918
import com.mairwunnx.projectessentials.core.impl.vanilla.commands.*
@@ -37,16 +36,16 @@ internal class ModuleObject : IModule {
3736
override val version = this::class.java.`package`.implementationVersion!!
3837
override val loadIndex = 0
3938

40-
private val generalConfiguration by lazy {
41-
getConfigurationByName<GeneralConfiguration>("general")
42-
}
43-
4439
private var dudeFuckedOff = true
4540

4641
init {
4742
MinecraftForge.EVENT_BUS.register(this)
4843
}
4944

45+
private val generalConfiguration by lazy {
46+
getConfigurationByName<GeneralConfiguration>("general")
47+
}
48+
5049
override fun init() = initializeModuleSettings()
5150

5251
@SubscribeEvent
@@ -87,7 +86,7 @@ internal class ModuleObject : IModule {
8786
registerNativeCommands(event.commandDispatcher, event.server.isDedicatedServer)
8887
}
8988

90-
ProcessorAPI.getProcessorByName("command").postProcess()
89+
CommandAPI.registerAll()
9190
}
9291

9392
@SubscribeEvent

0 commit comments

Comments
 (0)