22
33package com.mairwunnx.projectessentials.home
44
5- import com.mairwunnx.projectessentials.core.api.v1.localization.Localization
65import com.mairwunnx.projectessentials.core.api.v1.localization.LocalizationAPI
76import com.mairwunnx.projectessentials.core.api.v1.module.IModule
87import com.mairwunnx.projectessentials.core.api.v1.providers.ProviderAPI
98import com.mairwunnx.projectessentials.home.commands.DelHomeCommand
109import com.mairwunnx.projectessentials.home.commands.HomeCommand
1110import com.mairwunnx.projectessentials.home.commands.SetHomeCommand
1211import com.mairwunnx.projectessentials.home.configurations.HomeConfiguration
13- import com.mairwunnx.projectessentials.home.configurations.HomeConfigurationModel
1412import com.mairwunnx.projectessentials.home.configurations.HomeSettingsConfiguration
1513import com.mairwunnx.projectessentials.home.enums.HomeSelectStrategy.First
1614import com.mairwunnx.projectessentials.home.enums.HomeSelectStrategy.Last
@@ -19,14 +17,12 @@ import net.minecraftforge.common.MinecraftForge.EVENT_BUS
1917import net.minecraftforge.event.entity.player.PlayerEvent
2018import net.minecraftforge.eventbus.api.SubscribeEvent
2119import 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" )
2622class 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