Skip to content

Commit a6e6930

Browse files
committed
Resolution strategy for providers and localization changed.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 98340ff commit a6e6930

File tree

1 file changed

+8
-36
lines changed

1 file changed

+8
-36
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/home/ModuleObject.kt

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
package com.mairwunnx.projectessentials.home
44

5-
import com.mairwunnx.projectessentials.core.api.v1.localization.Localization
65
import com.mairwunnx.projectessentials.core.api.v1.localization.LocalizationAPI
76
import com.mairwunnx.projectessentials.core.api.v1.module.IModule
87
import com.mairwunnx.projectessentials.core.api.v1.providers.ProviderAPI
98
import com.mairwunnx.projectessentials.home.commands.DelHomeCommand
109
import com.mairwunnx.projectessentials.home.commands.HomeCommand
1110
import com.mairwunnx.projectessentials.home.commands.SetHomeCommand
1211
import com.mairwunnx.projectessentials.home.configurations.HomeConfiguration
13-
import com.mairwunnx.projectessentials.home.configurations.HomeConfigurationModel
1412
import com.mairwunnx.projectessentials.home.configurations.HomeSettingsConfiguration
1513
import com.mairwunnx.projectessentials.home.enums.HomeSelectStrategy.First
1614
import com.mairwunnx.projectessentials.home.enums.HomeSelectStrategy.Last
@@ -19,14 +17,12 @@ import net.minecraftforge.common.MinecraftForge.EVENT_BUS
1917
import net.minecraftforge.event.entity.player.PlayerEvent
2018
import net.minecraftforge.eventbus.api.SubscribeEvent
2119
import net.minecraftforge.fml.common.Mod
22-
import net.minecraftforge.fml.event.server.FMLServerStartingEvent
23-
import org.apache.logging.log4j.LogManager
2420

2521
@Mod("project_essentials_home")
2622
class ModuleObject : IModule {
2723
override val name = this::class.java.`package`.implementationTitle.split(" ").last()
2824
override val version = this::class.java.`package`.implementationVersion!!
29-
override val loadIndex = 20
25+
override val loadIndex = 4
3026
override fun init() = Unit
3127

3228
init {
@@ -47,38 +43,14 @@ class ModuleObject : IModule {
4743
}
4844

4945
private fun initLocalization() {
50-
LocalizationAPI.apply(
51-
Localization(
52-
mutableListOf(
53-
"/assets/projectessentialshome/lang/en_us.json",
54-
"/assets/projectessentialshome/lang/ru_ru.json",
55-
"/assets/projectessentialshome/lang/de_de.json",
56-
"/assets/projectessentialshome/lang/zh_cn.json"
57-
), "core", this.javaClass
46+
LocalizationAPI.apply(this.javaClass) {
47+
mutableListOf(
48+
"/assets/projectessentialshome/lang/en_us.json",
49+
"/assets/projectessentialshome/lang/ru_ru.json",
50+
"/assets/projectessentialshome/lang/de_de.json",
51+
"/assets/projectessentialshome/lang/zh_cn.json"
5852
)
59-
)
60-
// LocalizationAPI.apply(this.javaClass) {
61-
// mutableListOf(
62-
// "/assets/projectessentialshome/lang/en_us.json",
63-
// "/assets/projectessentialshome/lang/ru_ru.json",
64-
// "/assets/projectessentialshome/lang/de_de.json",
65-
// "/assets/projectessentialshome/lang/zh_cn.json"
66-
// )
67-
// }
68-
}
69-
70-
@SubscribeEvent
71-
fun onServerStart(event: FMLServerStartingEvent) {
72-
LogManager.getLogger().info(homeConfiguration.users.count())
73-
LogManager.getLogger().info("test")
74-
LogManager.getLogger().info(
75-
homeConfiguration.users.add(
76-
HomeConfigurationModel.User(
77-
"test", "testuuid", mutableListOf()
78-
)
79-
)
80-
)
81-
LogManager.getLogger().info(homeConfiguration.users.count())
53+
}
8254
}
8355

8456
@SubscribeEvent

0 commit comments

Comments
 (0)