aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/handlers/ConfigHandler.java
blob: 1d6311e2bd10c03fdda7bc345e70afeaa511f6ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
package me.Danker.handlers;

import me.Danker.DankersSkyblockMod;
import me.Danker.commands.MoveCommand;
import me.Danker.commands.ScaleCommand;
import me.Danker.commands.ToggleCommand;
import me.Danker.features.*;
import me.Danker.features.loot.LootDisplay;
import me.Danker.features.loot.LootTracker;
import me.Danker.features.puzzlesolvers.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;

import java.io.File;

public class ConfigHandler {
	public static Configuration config;
	private final static String file = "config/Danker's Skyblock Mod.cfg";
	
	public static void init() {
		config = new Configuration(new File(file));
		try {
			config.load();
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
	}
	
	public static int getInt(String category, String key) {
		try {
			if (config.getCategory(category).containsKey(key)) {
				return config.get(category, key, 0).getInt();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
		return 0;
	}
	
	public static double getDouble(String category, String key) {
		try {
			if (config.getCategory(category).containsKey(key)) {
				return config.get(category, key, 0D).getDouble();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
		return 0D;
	}
	
	public static String getString(String category, String key) {
		try {
			if (config.getCategory(category).containsKey(key)) {
				return config.get(category, key, "").getString();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
		return "";
	}
	
	public static boolean getBoolean(String category, String key) {
		try {
			if (config.getCategory(category).containsKey(key)) {
				return config.get(category, key, false).getBoolean();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
		return true;
	}

	public static void writeIntConfig(String category, String key, int value) {
		try {
			int set = config.get(category, key, value).getInt();
			config.getCategory(category).get(key).set(value);
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
	}
	
	public static void writeDoubleConfig(String category, String key, double value) {
		try {
			double set = config.get(category, key, value).getDouble();
			config.getCategory(category).get(key).set(value);
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
	}
	
	public static void writeStringConfig(String category, String key, String value) {
		try {
			String set = config.get(category, key, value).getString();
			config.getCategory(category).get(key).set(value);
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
	}
	
	public static void writeBooleanConfig(String category, String key, boolean value) {
		try {
			boolean set = config.get(category, key, value).getBoolean();
			config.getCategory(category).get(key).set(value);
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
	}
	
	public static boolean hasKey(String category, String key) {
		try {
			if (!config.hasCategory(category)) return false;
			return config.getCategory(category).containsKey(key);
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
		return false;
	}
	
	public static void deleteCategory(String category) {
		try {
			if (config.hasCategory(category)) {
				config.removeCategory(new ConfigCategory(category));
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			config.save();
		}
	}

	public static int initInt(String category, String key, int defaultValue) {
		if (!hasKey(category, key)) {
			writeIntConfig(category, key, defaultValue);
			return defaultValue;
		} else {
			return getInt(category, key);
		}
	}

	public static double initDouble(String category, String key, double defaultValue) {
		if (!hasKey(category, key)) {
			writeDoubleConfig(category, key, defaultValue);
			return defaultValue;
		} else {
			return getDouble(category, key);
		}
	}

	public static String initString(String category, String key, String defaultValue) {
		if (!hasKey(category, key)) {
			writeStringConfig(category, key, defaultValue);
			return defaultValue;
		} else {
			return getString(category, key);
		}
	}

	public static boolean initBoolean(String category, String key, boolean defaultValue) {
		if (!hasKey(category, key)) {
			writeBooleanConfig(category, key, defaultValue);
			return defaultValue;
		} else {
			return getBoolean(category, key);
		}
	}
	
	public static void reloadConfig() {
		init();

		// Toggles
		ToggleCommand.gpartyToggled = initBoolean("toggles", "GParty", false);
		ToggleCommand.coordsToggled = initBoolean("toggles", "Coords", false);
		ToggleCommand.goldenToggled = initBoolean("toggles", "Golden", false);
		ToggleCommand.slayerCountTotal = initBoolean("toggles", "SlayerCount", true);
		ToggleCommand.rngesusAlerts = initBoolean("toggles", "RNGesusAlerts", false);
		ToggleCommand.ghostDisplay = initBoolean("toggles", "GhostDisplay", true);
		ToggleCommand.dungeonTimerToggled = initBoolean("toggles", "GhostTimer", false);
		ToggleCommand.splitFishing = initBoolean("toggles", "SplitFishing", true);
		ToggleCommand.chatMaddoxToggled = initBoolean("toggles", "ChatMaddox", false);
		ToggleCommand.spiritBearAlerts = initBoolean("toggles", "SpiritBearAlerts", false);
		ToggleCommand.petColoursToggled = initBoolean("toggles", "PetColors", false);
		ToggleCommand.golemAlertToggled = initBoolean("toggles", "GolemAlerts", false);
		ToggleCommand.expertiseLoreToggled = initBoolean("toggles", "ExpertiseLore", false);
		ToggleCommand.skill50DisplayToggled = initBoolean("toggles", "Skill50Display", false);
		ToggleCommand.outlineTextToggled = initBoolean("toggles", "OutlineText", false);
		ToggleCommand.cakeTimerToggled = initBoolean("toggles", "CakeTimer", false);
		ToggleCommand.melodyTooltips = initBoolean("toggles", "MelodyTooltips", false);
		ToggleCommand.highlightSlayers = initBoolean("toggles", "HighlightSlayers", false);
		ToggleCommand.highlightArachne = initBoolean("toggles", "HighlightArachne", false);
		ToggleCommand.highlightSkeletonMasters = initBoolean("toggles", "HighlightSkeletonMasters", false);
		ToggleCommand.teammatesInRadius = initBoolean("toggles", "TeammatesInRadius", false);
		ToggleCommand.giantHP = initBoolean("toggles", "GiantHP", false);
		ToggleCommand.hidePetCandy = initBoolean("toggles", "HidePetCandy", false);
		ToggleCommand.customColouredNames = initBoolean("toggles", "CustomColouredNames", true);
		ToggleCommand.endOfFarmAlert = initBoolean("toggles", "EndOfFarmAlert", false);
		ToggleCommand.gemstoneLore = initBoolean("toggles", "GemstoneLore", false);
		// Chat Messages
		ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true);
		ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true);
		ToggleCommand.implosionMessages = initBoolean("toggles", "ImplosionMessages", true);
		ToggleCommand.healMessages = initBoolean("toggles", "HealMessages", true);
		ToggleCommand.cooldownMessages = initBoolean("toggles", "CooldownMessages", true);
		ToggleCommand.manaMessages = initBoolean("toggles", "ManaMessages", true);
		ToggleCommand.killComboMessages = initBoolean("toggles", "KillComboMessages", true);
		// Dungeons
		ToggleCommand.dungeonTimerToggled = initBoolean("toggles", "DungeonTimer", false);
		ToggleCommand.lowHealthNotifyToggled = initBoolean("toggles", "LowHealthNotify", false);
		ToggleCommand.lividSolverToggled = initBoolean("toggles", "LividSolver", false);
		ToggleCommand.stopSalvageStarredToggled = initBoolean("toggles", "StopSalvageStarred", false);
		ToggleCommand.watcherReadyToggled = initBoolean("toggles", "WatcherReadyMessage", false);
		ToggleCommand.notifySlayerSlainToggled = initBoolean("toggles", "NotifySlayerSlain", false);
		ToggleCommand.necronNotificationsToggled = initBoolean("toggles", "NecronNotifications", false);
		ToggleCommand.bonzoTimerToggled = initBoolean("toggles", "BonzoTimer", false);
		ToggleCommand.swapToPickBlockToggled = initBoolean("toggles", "PickBlock", false);
		ToggleCommand.autoSkillTrackerToggled =  initBoolean("toggles", "AutoSkillTracker", false);
		// Puzzle Solvers
		ToggleCommand.threeManToggled = initBoolean("toggles", "ThreeManPuzzle", false);
		ToggleCommand.oruoToggled = initBoolean("toggles", "OruoPuzzle", false);
		ToggleCommand.blazeToggled = initBoolean("toggles", "BlazePuzzle", false);
		ToggleCommand.creeperToggled = initBoolean("toggles", "CreeperPuzzle", false);
		ToggleCommand.creeperLinesToggled = initBoolean("toggles", "CreeperLines", true);
		ToggleCommand.waterToggled = initBoolean("toggles", "WaterPuzzle", false);
		ToggleCommand.ticTacToeToggled = initBoolean("toggles", "TicTacToePuzzle", false);
		ToggleCommand.boulderToggled = initBoolean("toggles", "BoulderPuzzle", false);
		ToggleCommand.silverfishToggled = initBoolean("toggles", "SilverfishPuzzle", false);
		ToggleCommand.iceWalkToggled = initBoolean("toggles", "IceWalkPuzzle", false);
		ToggleCommand.startsWithToggled = initBoolean("toggles", "StartsWithTerminal", false);
		ToggleCommand.selectAllToggled = initBoolean("toggles", "SelectAllTerminal", false);
		ToggleCommand.clickInOrderToggled = initBoolean("toggles", "ClickInOrderTerminal", false);
		// Experiment Solvers
		ToggleCommand.ultrasequencerToggled = initBoolean("toggles", "UltraSequencer", false);
		ToggleCommand.chronomatronToggled = initBoolean("toggles", "Chronomatron", false);
		ToggleCommand.superpairsToggled = initBoolean("toggles", "Superpairs", false);
		ToggleCommand.hideTooltipsInExperimentAddonsToggled = initBoolean("toggles", "HideTooltipsInExperimentAddons", false);
		// Custom Music
		ToggleCommand.dungeonBossMusic = initBoolean("toggles", "DungeonBossMusic", false);
		ToggleCommand.bloodRoomMusic = initBoolean("toggles", "BloodRoomMusic", false);
		ToggleCommand.dungeonMusic = initBoolean("toggles", "DungeonMusic", false);
		// Music Volume
		CustomMusic.dungeonbossVolume = initInt("music", "DungeonBossVolume", 50);
		CustomMusic.bloodroomVolume = initInt("music", "BloodRoomVolume", 50);
		CustomMusic.dungeonVolume = initInt("music", "DungeonVolume", 50);

		// API
		if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", "");
		
		// Wolf
		LootTracker.wolfSvens = initInt("wolf", "svens", 0);
		LootTracker.wolfTeeth = initInt("wolf", "teeth", 0);
		LootTracker.wolfWheels = initInt("wolf", "wheel", 0);
		LootTracker.wolfWheelsDrops = initInt("wolf", "wheelDrops", 0);
		LootTracker.wolfSpirits = initInt("wolf", "spirit", 0);
		LootTracker.wolfBooks = initInt("wolf", "book", 0);
		LootTracker.wolfEggs = initInt("wolf", "egg", 0);
		LootTracker.wolfCoutures = initInt("wolf", "couture", 0);
		LootTracker.wolfBaits = initInt("wolf", "bait", 0);
		LootTracker.wolfFluxes = initInt("wolf", "flux", 0);
		LootTracker.wolfTime = initDouble("wolf", "timeRNG", -1);
		LootTracker.wolfBosses = initInt("wolf", "bossRNG", -1);
		// Spider
		LootTracker.spiderTarantulas = initInt("spider", "tarantulas", 0);
		LootTracker.spiderWebs = initInt("spider", "web", 0);
		LootTracker.spiderTAP = initInt("spider", "tap", 0);
		LootTracker.spiderTAPDrops = initInt("spider", "tapDrops", 0);
		LootTracker.spiderBites = initInt("spider", "bite", 0);
		LootTracker.spiderCatalysts = initInt("spider", "catalyst", 0);
		LootTracker.spiderBooks = initInt("spider", "book", 0);
		LootTracker.spiderSwatters = initInt("spider", "swatter", 0);
		LootTracker.spiderTalismans = initInt("spider", "talisman", 0);
		LootTracker.spiderMosquitos = initInt("spider", "mosquito", 0);
		LootTracker.spiderTime = initDouble("spider", "timeRNG", -1);
		LootTracker.spiderBosses = initInt("spider", "bossRNG", -1);
		// Zombie
		LootTracker.zombieRevs = initInt("zombie", "revs", 0);
		LootTracker.zombieRevFlesh = initInt("zombie", "revFlesh", 0);
		LootTracker.zombieRevViscera = initInt("zombie", "revViscera", 0);
		LootTracker.zombieFoulFlesh = initInt("zombie", "foulFlesh", 0);
		LootTracker.zombieFoulFleshDrops = initInt("zombie", "foulFleshDrops", 0);
		LootTracker.zombiePestilences = initInt("zombie", "pestilence", 0);
		LootTracker.zombieUndeadCatas = initInt("zombie", "undeadCatalyst", 0);
		LootTracker.zombieBooks = initInt("zombie", "book", 0);
		LootTracker.zombieBeheadeds = initInt("zombie", "beheaded", 0);
		LootTracker.zombieRevCatas = initInt("zombie", "revCatalyst", 0);
		LootTracker.zombieSnakes = initInt("zombie", "snake", 0);
		LootTracker.zombieScythes = initInt("zombie", "scythe", 0);
		LootTracker.zombieShards = initInt("zombie", "shard", 0);
		LootTracker.zombieWardenHearts = initInt("zombie", "heart", 0);
		LootTracker.zombieTime = initDouble("zombie", "timeRNG", -1);
		LootTracker.zombieBosses = initInt("zombie", "bossRNG", -1);
		// Enderman
		LootTracker.endermanVoidglooms = initInt("enderman", "voidglooms", 0);
		LootTracker.endermanNullSpheres = initInt("enderman", "nullSpheres", 0);
		LootTracker.endermanTAP = initInt("enderman", "tap", 0);
		LootTracker.endermanTAPDrops = initInt("enderman", "tapDrops", 0);
		LootTracker.endermanEndersnakes = initInt("enderman", "endersnakes", 0);
		LootTracker.endermanSummoningEyes = initInt("enderman", "summoningEyes", 0);
		LootTracker.endermanManaBooks = initInt("enderman", "manaBooks", 0);
		LootTracker.endermanTuners = initInt("enderman", "tuners", 0);
		LootTracker.endermanAtoms = initInt("enderman", "atoms", 0);
		LootTracker.endermanEspressoMachines = initInt("enderman", "espressoMachines", 0);
		LootTracker.endermanSmartyBooks = initInt("enderman", "smartyBooks", 0);
		LootTracker.endermanEndRunes = initInt("enderman", "endRunes", 0);
		LootTracker.endermanChalices = initInt("enderman", "chalices", 0);
		LootTracker.endermanDice = initInt("enderman", "dice", 0);
		LootTracker.endermanArtifacts = initInt("enderman", "artifacts", 0);
		LootTracker.endermanSkins = initInt("enderman", "skins", 0);
		LootTracker.endermanMergers = initInt("enderman", "mergers", 0);
		LootTracker.endermanCores = initInt("enderman", "cores", 0);
		LootTracker.endermanEnchantRunes = initInt("enderman", "enchantRunes", 0);
		LootTracker.endermanEnderBooks = initInt("enderman", "enderBooks", 0);
		LootTracker.endermanTime = initDouble("enderman", "timeRNG", -1);
		LootTracker.endermanBosses = initInt("enderman", "bossRNG", -1);
		
		// Fishing
		LootTracker.seaCreatures = initInt("fishing", "seaCreature", 0);
		LootTracker.goodCatches = initInt("fishing", "goodCatch", 0);
		LootTracker.greatCatches = initInt("fishing", "greatCatch", 0);
		LootTracker.squids = initInt("fishing", "squid", 0);
		LootTracker.seaWalkers = initInt("fishing", "seaWalker", 0);
		LootTracker.nightSquids = initInt("fishing", "nightSquid", 0);
		LootTracker.seaGuardians = initInt("fishing", "seaGuardian", 0);
		LootTracker.seaWitches = initInt("fishing", "seaWitch", 0);
		LootTracker.seaArchers = initInt("fishing", "seaArcher", 0);
		LootTracker.monsterOfTheDeeps = initInt("fishing", "monsterOfDeep", 0);
		LootTracker.catfishes = initInt("fishing", "catfish", 0);
		LootTracker.carrotKings = initInt("fishing", "carrotKing", 0);
		LootTracker.seaLeeches = initInt("fishing", "seaLeech", 0);
		LootTracker.guardianDefenders = initInt("fishing", "guardianDefender", 0);
		LootTracker.deepSeaProtectors = initInt("fishing", "deepSeaProtector", 0);
		LootTracker.hydras = initInt("fishing", "hydra", 0);
		LootTracker.seaEmperors = initInt("fishing", "seaEmperor", 0);
		LootTracker.empTime = initDouble("fishing", "empTime", -1);
		LootTracker.empSCs = initInt("fishing", "empSC", -1);
		LootTracker.fishingMilestone = initInt("fishing", "milestone", 0);
		// Fishing Winter
		LootTracker.frozenSteves = initInt("fishing", "frozenSteve", 0);
		LootTracker.frostyTheSnowmans = initInt("fishing", "snowman", 0);
		LootTracker.grinches = initInt("fishing", "grinch", 0);
		LootTracker.yetis = initInt("fishing", "yeti", 0);
		LootTracker.yetiTime = initDouble("fishing", "yetiTime", -1);
		LootTracker.yetiSCs = initInt("fishing", "yetiSC", -1);
		// Fishing Festival
		LootTracker.nurseSharks = initInt("fishing", "nurseShark", 0);
		LootTracker.blueSharks = initInt("fishing", "blueShark", 0);
		LootTracker.tigerSharks = initInt("fishing", "tigerShark", 0);
		LootTracker.greatWhiteSharks = initInt("fishing", "greatWhiteShark", 0);
		// Spooky Fishing
		LootTracker.scarecrows = initInt("fishing", "scarecrow", 0);
		LootTracker.nightmares = initInt("fishing", "nightmare", 0);
		LootTracker.werewolfs = initInt("fishing", "werewolf", 0);
		LootTracker.phantomFishers = initInt("fishing", "phantomFisher", 0);
		LootTracker.grimReapers = initInt("fishing", "grimReaper", 0);
		
		// Mythological
		LootTracker.mythCoins = initDouble("mythological", "coins", 0);
		LootTracker.griffinFeathers = initInt("mythological", "griffinFeather", 0);
		LootTracker.crownOfGreeds = initInt("mythological", "crownOfGreed", 0);
		LootTracker.washedUpSouvenirs = initInt("mythological", "washedUpSouvenir", 0);
		LootTracker.minosHunters = initInt("mythological", "minosHunter", 0);
		LootTracker.siameseLynxes = initInt("mythological", "siameseLynx", 0);
		LootTracker.minotaurs = initInt("mythological", "minotaur", 0);
		LootTracker.gaiaConstructs = initInt("mythological", "gaiaConstruct", 0);
		LootTracker.minosChampions = initInt("mythological", "minosChampion", 0);
		LootTracker.minosInquisitors = initInt("mythological", "minosInquisitor", 0);
		
		// Dungeons
		LootTracker.recombobulators =  initInt("catacombs", "recombobulator", 0);
		LootTracker.fumingPotatoBooks = initInt("catacombs", "fumingBooks", 0);
		// F1
		LootTracker.bonzoStaffs = initInt("catacombs", "bonzoStaff", 0);
		LootTracker.f1CoinsSpent = initDouble("catacombs", "floorOneCoins", 0);
		LootTracker.f1TimeSpent = initDouble("catacombs", "floorOneTime", 0);
		// F2
		LootTracker.scarfStudies = initInt("catacombs", "scarfStudies", 0);
		LootTracker.f2CoinsSpent = initDouble("catacombs", "floorTwoCoins", 0);
		LootTracker.f2TimeSpent = initDouble("catacombs", "floorTwoTime", 0);
		// F3
		LootTracker.adaptiveHelms = initInt("catacombs", "adaptiveHelm", 0);
		LootTracker.adaptiveChests = initInt("catacombs", "adaptiveChest", 0);
		LootTracker.adaptiveLegs = initInt("catacombs", "adaptiveLegging", 0);
		LootTracker.adaptiveBoots = initInt("catacombs", "adaptiveBoot", 0);
		LootTracker.adaptiveSwords = initInt("catacombs", "adaptiveSword", 0);
		LootTracker.f3CoinsSpent = initDouble("catacombs", "floorThreeCoins", 0);
		LootTracker.f3TimeSpent = initDouble("catacombs", "floorThreeTime", 0);
		// F4
		LootTracker.spiritWings = initInt("catacombs", "spiritWing", 0);
		LootTracker.spiritBones = initInt("catacombs", "spiritBone", 0);
		LootTracker.spiritBoots = initInt("catacombs", "spiritBoot", 0);
		LootTracker.spiritSwords = initInt("catacombs", "spiritSword", 0);
		LootTracker.spiritBows = initInt("catacombs", "spiritBow", 0);
		LootTracker.epicSpiritPets = initInt("catacombs", "spiritPetEpic", 0);
		LootTracker.legSpiritPets = initInt("catacombs", "spiritPetLeg", 0);
		LootTracker.f4CoinsSpent = initDouble("catacombs", "floorFourCoins", 0);
		LootTracker.f4TimeSpent = initDouble("catacombs", "floorFourTime", 0);
		// F5
		LootTracker.warpedStones = initInt("catacombs", "warpedStone", 0);
		LootTracker.shadowAssHelms = initInt("catacombs", "shadowAssassinHelm", 0);
		LootTracker.shadowAssChests = initInt("catacombs", "shadowAssassinChest", 0);
		LootTracker.shadowAssLegs = initInt("catacombs", "shadowAssassinLegging", 0);
		LootTracker.shadowAssBoots = initInt("catacombs", "shadowAssassinBoot", 0);
		LootTracker.lastBreaths = initInt("catacombs", "lastBreath", 0);
		LootTracker.lividDaggers = initInt("catacombs", "lividDagger", 0);
		LootTracker.shadowFurys = initInt("catacombs", "shadowFury", 0);
		LootTracker.f5CoinsSpent = initDouble("catacombs", "floorFiveCoins", 0);
		LootTracker.f5TimeSpent = initDouble("catacombs", "floorFiveTime", 0);
		// F6
		LootTracker.ancientRoses = initInt("catacombs", "ancientRose", 0);
		LootTracker.precursorEyes = initInt("catacombs", "precursorEye", 0);
		LootTracker.giantsSwords = initInt("catacombs", "giantsSword", 0);
		LootTracker.necroLordHelms = initInt("catacombs", "necroLordHelm", 0);
		LootTracker.necroLordChests = initInt("catacombs", "necroLordChest", 0);
		LootTracker.necroLordLegs = initInt("catacombs", "necroLordLegging", 0);
		LootTracker.necroLordBoots = initInt("catacombs", "necroLordBoot", 0);
		LootTracker.necroSwords = initInt("catacombs", "necroSword", 0);
		LootTracker.f6CoinsSpent = initDouble("catacombs", "floorSixCoins", 0);
		LootTracker.f6TimeSpent = initDouble("catacombs", "floorSixTime", 0);
		// F7
		LootTracker.witherBloods = initInt("catacombs", "witherBlood", 0);
		LootTracker.witherCloaks = initInt("catacombs", "witherCloak", 0);
		LootTracker.implosions = initInt("catacombs", "implosion", 0);
		LootTracker.witherShields = initInt("catacombs", "witherShield", 0);
		LootTracker.shadowWarps = initInt("catacombs", "shadowWarp", 0);
		LootTracker.necronsHandles = initInt("catacombs", "necronsHandle", 0);
		LootTracker.autoRecombs = initInt("catacombs", "autoRecomb", 0);
		LootTracker.witherHelms = initInt("catacombs", "witherHelm", 0);
		LootTracker.witherChests = initInt("catacombs", "witherChest", 0);
		LootTracker.witherLegs = initInt("catacombs", "witherLegging", 0);
		LootTracker.witherBoots = initInt("catacombs", "witherBoot", 0);
		LootTracker.f7CoinsSpent = initDouble("catacombs", "floorSevenCoins", 0);
		LootTracker.f7TimeSpent = initDouble("catacombs", "floorSevenTime", 0);

		// Ghost
		LootTracker.sorrows = initInt("ghosts", "sorrow", 0);
		LootTracker.voltas = initInt("ghosts", "volta", 0);
		LootTracker.plasmas = initInt("ghosts", "plasma", 0);
		LootTracker.ghostlyBoots = initInt("ghosts", "ghostlyBoots", 0);
		LootTracker.bagOfCashs = initInt("ghosts", "bagOfCash", 0);

		// Misc
		LootDisplay.display = initString("misc", "display", "off");
		LootDisplay.auto = initBoolean("misc", "autoDisplay", false);
		Skill50Display.SKILL_TIME = initInt("misc", "skill50Time", 3) * 20;
		CakeTimer.cakeTime = initDouble("misc", "cakeTime", 0);
		SkillTracker.showSkillTracker = initBoolean("misc", "showSkillTracker", false);
		DankersSkyblockMod.firstLaunch = initBoolean("misc", "firstLaunch", true);
		EndOfFarmAlert.min = initDouble("misc", "farmMin", -78.5);
		EndOfFarmAlert.max = initDouble("misc", "farmMax", 79.5);

		// Locations
		ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft());
		int height = scaled.getScaledHeight();
		MoveCommand.coordsXY[0] = initInt("locations", "coordsX", 5);
		MoveCommand.coordsXY[1] = initInt("locations", "coordsY", height - 25);
		MoveCommand.displayXY[0] = initInt("locations", "displayX", 80);
		MoveCommand.displayXY[1] = initInt("locations", "displayY", 5);
		MoveCommand.dungeonTimerXY[0] = initInt("locations", "dungeonTimerX", 5);
		MoveCommand.dungeonTimerXY[1] = initInt("locations", "dungeonTimerY", 5);
		MoveCommand.skill50XY[0] = initInt("locations", "skill50X", 40);
		MoveCommand.skill50XY[1] = initInt("locations", "skill50Y", 10);
		MoveCommand.lividHpXY[0] = initInt("locations", "lividHpX", 40);
		MoveCommand.lividHpXY[1] = initInt("locations", "lividHpY", 20);
		MoveCommand.cakeTimerXY[0] = initInt("locations", "cakeTimerX", 40);
		MoveCommand.cakeTimerXY[1] = initInt("locations", "cakeTimerY", 30);
		MoveCommand.skillTrackerXY[0] = initInt("locations", "skillTrackerX", 40);
		MoveCommand.skillTrackerXY[1] = initInt("locations", "skillTrackerY", 50);
		MoveCommand.waterAnswerXY[0] = initInt("locations", "waterAnswerX", 100);
		MoveCommand.waterAnswerXY[1] = initInt("locations", "waterAnswerY", 100);
		MoveCommand.bonzoTimerXY[0] = initInt("locations", "bonzoTimerX", 40);
		MoveCommand.bonzoTimerXY[1] = initInt("locations", "bonzoTimerY", 80);
		MoveCommand.golemTimerXY[0] = initInt("locations", "golemTimerX", 100);
		MoveCommand.golemTimerXY[1] = initInt("locations", "golemTimerY", 30);
		MoveCommand.teammatesInRadiusXY[0] = initInt("locations", "teammatesInRadiusX", 80);
		MoveCommand.teammatesInRadiusXY[1] = initInt("locations", "teammatesInRadiusY", 100);
		MoveCommand.giantHPXY[0] = initInt("locations", "giantHPX", 80);
		MoveCommand.giantHPXY[1] = initInt("locations", "giantHPY", 150);

		// Scales
		ScaleCommand.coordsScale = initDouble("scales", "coordsScale", 1);
		ScaleCommand.displayScale = initDouble("scales", "displayScale", 1);
		ScaleCommand.dungeonTimerScale = initDouble("scales", "dungeonTimerScale", 1);
		ScaleCommand.skill50Scale = initDouble("scales", "skill50Scale", 1);
		ScaleCommand.lividHpScale = initDouble("scales", "lividHpScale", 1);
		ScaleCommand.cakeTimerScale = initDouble("scales", "cakeTimerScale", 1);
		ScaleCommand.skillTrackerScale = initDouble("scales", "skillTrackerScale", 1);
		ScaleCommand.waterAnswerScale = initDouble("scales", "waterAnswerScale", 1);
		ScaleCommand.bonzoTimerScale = initDouble("scales", "bonzoTimerScale", 1);
		ScaleCommand.golemTimerScale = initDouble("scales", "golemTimerScale", 1);
		ScaleCommand.teammatesInRadiusScale = initDouble("scales", "teammatesInRadiusScale", 1);
		ScaleCommand.giantHPScale = initDouble("scales", "giantHPScale", 1);

		// Skills
		DankersSkyblockMod.farmingLevel = initInt("skills", "farming", -1);
		DankersSkyblockMod.miningLevel = initInt("skills", "mining", -1);
		DankersSkyblockMod.combatLevel = initInt("skills", "combat", -1);
		DankersSkyblockMod.foragingLevel = initInt("skills", "foraging", -1);
		DankersSkyblockMod.fishingLevel = initInt("skills", "fishing", -1);
		DankersSkyblockMod.enchantingLevel = initInt("skills", "enchanting", -1);
		DankersSkyblockMod.alchemyLevel = initInt("skills", "alchemy", -1);
		DankersSkyblockMod.carpentryLevel = initInt("skills", "carpentry", -1);

		// Colours
		DankersSkyblockMod.MAIN_COLOUR = initString("colors", "main", EnumChatFormatting.GREEN.toString());
		DankersSkyblockMod.SECONDARY_COLOUR = initString("colors", "secondary", EnumChatFormatting.DARK_GREEN.toString());
		DankersSkyblockMod.DELIMITER_COLOUR = initString("colors", "delimiter", EnumChatFormatting.AQUA.toString() + EnumChatFormatting.STRIKETHROUGH.toString());
		DankersSkyblockMod.ERROR_COLOUR = initString("colors", "error", EnumChatFormatting.RED.toString());
		DankersSkyblockMod.TYPE_COLOUR = initString("colors", "type", EnumChatFormatting.GREEN.toString());
		DankersSkyblockMod.VALUE_COLOUR = initString("colors", "value", EnumChatFormatting.DARK_GREEN.toString());
		DankersSkyblockMod.SKILL_AVERAGE_COLOUR = initString("colors", "skillAverage", EnumChatFormatting.GOLD.toString());
		DankersSkyblockMod.ANSWER_COLOUR = initString("colors", "answer", EnumChatFormatting.DARK_GREEN.toString());
		Skill50Display.SKILL_50_COLOUR = initString("colors", "skill50Display", EnumChatFormatting.AQUA.toString());
		NoF3Coords.COORDS_COLOUR = initString("colors", "coordsDisplay", EnumChatFormatting.WHITE.toString());
		CakeTimer.CAKE_COLOUR = initString("colors", "cakeDisplay", EnumChatFormatting.GOLD.toString());
		SkillTracker.SKILL_TRACKER_COLOUR = initString("colors", "skillTracker", EnumChatFormatting.AQUA.toString());
		TriviaSolver.TRIVIA_WRONG_ANSWER_COLOUR = initString("colors", "triviaWrongAnswer", EnumChatFormatting.RED.toString());
		BonzoMaskTimer.BONZO_COLOR = initString("colors", "bonzoDisplay", EnumChatFormatting.RED.toString());
		GolemSpawningAlert.GOLEM_COLOUR = initString("colors", "golemDisplay", EnumChatFormatting.GOLD.toString());
		BlazeSolver.LOWEST_BLAZE_COLOUR = initInt("colors", "blazeLowest", 0xFF0000);
		BlazeSolver.HIGHEST_BLAZE_COLOUR = initInt("colors", "blazeHighest", 0x40FF40);
		SlayerESP.SLAYER_COLOUR = initInt("colors", "slayerColor", 0x0000FF);
		ArachneESP.ARACHANE_COLOUR = initInt("colors", "arachneColor", 0x00FF00);
		HighlightSkeletonMasters.SKELETON_MASTER_COLOUR = initInt("colors", "skeletonMaster", 0xFF0000);
		PetColours.PET_1_TO_9 = initInt("colors", "pet1To9", 0x999999); // Grey
		PetColours.PET_10_TO_19 = initInt("colors", "pet10To19", 0xD62440); // Red
		PetColours.PET_20_TO_29 = initInt("colors", "pet20To29", 0xEF5230); // Orange
		PetColours.PET_30_TO_39 = initInt("colors", "pet30To39", 0xFFC400); // Yellow
		PetColours.PET_40_TO_49 = initInt("colors", "pet40To49", 0x0EAC35); // Green
		PetColours.PET_50_TO_59 = initInt("colors", "pet50To59", 0x008AD8); // Light Blue
		PetColours.PET_60_TO_69 = initInt("colors", "pet60To69", 0x7E4FC6); // Purple
		PetColours.PET_70_TO_79 = initInt("colors", "pet70To79", 0xD64FC8); // Pink
		PetColours.PET_80_TO_89 = initInt("colors", "pet80To89", 0x5C1F35); // idk weird magenta
		PetColours.PET_90_TO_99 = initInt("colors", "pet90To99", 0x9E794E); // Brown
		PetColours.PET_100 = initInt("colors", "pet100", 0xF2D249); // Gold
		UltrasequencerSolver.ULTRASEQUENCER_NEXT = initInt("colors", "ultrasequencerNext", 0x40FF40);
		UltrasequencerSolver.ULTRASEQUENCER_NEXT_TO_NEXT = initInt("colors", "ultrasequencerNextToNext", 0x40DAE6);
		ChronomatronSolver.CHRONOMATRON_NEXT = initInt("colors", "chronomatronNext", 0x40FF40);
		ChronomatronSolver.CHRONOMATRON_NEXT_TO_NEXT = initInt("colors", "chronomatronNextToNext", 0x40DAE6);
		ClickInOrderSolver.CLICK_IN_ORDER_NEXT = initInt("colors", "clickInOrderNext", 0xFF00DD);
		ClickInOrderSolver.CLICK_IN_ORDER_NEXT_TO_NEXT = initInt("colors", "clickInOrderNextToNext", 0x0BEFE7);
		BoulderSolver.BOULDER_COLOUR = initInt("colors", "boulder", 0x197F19);
		BoulderSolver.BOULDER_ARROW_COLOUR = initInt("colors", "boulderArrow", 0x006000);
		SilverfishSolver.SILVERFISH_LINE_COLOUR = initInt("colors", "silverfishLine", 0x40FF40);
		IceWalkSolver.ICE_WALK_LINE_COLOUR = initInt("colors", "iceWalkLine", 0x40FF40);

		// Commands
		if (!hasKey("commands", "reparty")) writeBooleanConfig("commands", "reparty", false);
	}
	
}