2121
2222public class Config {
2323
24- public static final Logger LOGGER = LogManager .getLogger (Config .class .getSimpleName ());
2524 private static final String CURRENT_REGION = Locale .getDefault ().getCountry ().toUpperCase (Locale .ROOT );
2625 private static final String GLOBAL_CONFIG_FILE_NAME = "config.yml" ;
2726 private static final String LANG_CONFIG_FILE_NAME = "lang.yml" ;
@@ -49,13 +48,13 @@ public class Config {
4948 loadGlobalConfig (pluginFolder , false );
5049 } catch (Exception e ) {
5150 MessageUtil .broadcastCommandMessage (sender , Component .text ("Failed to reload " + GLOBAL_CONFIG_FILE_NAME + ". See error in console!" , NamedTextColor .RED ));
52- LOGGER .error (e );
51+ RandomSpawnPlus . LOGGER .error (e );
5352 }
5453 try {
5554 loadLangConfig (pluginFolder , false );
5655 } catch (Exception e ) {
5756 MessageUtil .broadcastCommandMessage (sender , Component .text ("Failed to reload " + LANG_CONFIG_FILE_NAME + ". See error in console!" , NamedTextColor .RED ));
58- LOGGER .error (e );
57+ RandomSpawnPlus . LOGGER .error (e );
5958 }
6059
6160 final String success = String .format ("Successfully reloaded config in %sms." , (System .nanoTime () - begin ) / 1_000_000 );
@@ -65,32 +64,32 @@ public class Config {
6564
6665 public static void loadConfig (Plugin instance ) {
6766 long begin = System .nanoTime ();
68- LOGGER .info ("Loading config..." );
67+ RandomSpawnPlus . LOGGER .info ("Loading config..." );
6968
7069 final File pluginFolder = instance .getDataFolder ();
7170
7271 try {
7372 createDirectory (pluginFolder );
7473 } catch (Exception e ) {
75- LOGGER .error ("Failed to create <{}> plugin folder!" , pluginFolder .getAbsolutePath (), e );
74+ RandomSpawnPlus . LOGGER .error ("Failed to create <{}> plugin folder!" , pluginFolder .getAbsolutePath (), e );
7675 }
7776 try {
7877 loadGlobalConfig (pluginFolder , true );
7978 } catch (Exception e ) {
80- LOGGER .error ("Failed to load " + GLOBAL_CONFIG_FILE_NAME + "!" , e );
79+ RandomSpawnPlus . LOGGER .error ("Failed to load " + GLOBAL_CONFIG_FILE_NAME + "!" , e );
8180 }
8281 try {
8382 loadLangConfig (pluginFolder , true );
8483 } catch (Exception e ) {
85- LOGGER .error ("Failed to load " + LANG_CONFIG_FILE_NAME + "!" , e );
84+ RandomSpawnPlus . LOGGER .error ("Failed to load " + LANG_CONFIG_FILE_NAME + "!" , e );
8685 }
8786 try {
8887 loadSpawnStorage (pluginFolder , true );
8988 } catch (Exception e ) {
90- LOGGER .error ("Failed to load " + SPAWN_STORAGE_FILE_NAME + "!" , e );
89+ RandomSpawnPlus . LOGGER .error ("Failed to load " + SPAWN_STORAGE_FILE_NAME + "!" , e );
9190 }
9291
93- LOGGER .info ("Successfully loaded config in {}ms." , (System .nanoTime () - begin ) / 1_000_000 );
92+ RandomSpawnPlus . LOGGER .info ("Successfully loaded config in {}ms." , (System .nanoTime () - begin ) / 1_000_000 );
9493 }
9594
9695 private static void loadGlobalConfig (File pluginFolder , boolean init ) throws Exception {
@@ -108,7 +107,7 @@ private static void loadLangConfig(File pluginFolder, boolean init) throws Excep
108107 private static void loadSpawnStorage (File pluginFolder , boolean init ) throws Exception {
109108 spawnStorage = new SpawnStorage (pluginFolder , SPAWN_STORAGE_FILE_NAME , init );
110109
111- spawnStorage .saveConfig (pluginFolder );
110+ spawnStorage .saveConfig ();
112111 }
113112
114113 public static void createDirectory (File dir ) throws IOException {
0 commit comments