aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/loot/LootTracker.java
blob: 8a2739aa2f225d977f55f6f5b2f57e5095834f08 (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
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
package me.Danker.features.loot;

import me.Danker.commands.ToggleCommand;
import me.Danker.events.ChestSlotClickedEvent;
import me.Danker.handlers.ConfigHandler;
import me.Danker.handlers.ScoreboardHandler;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StringUtils;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

import java.util.List;

public class LootTracker {

    // Wolf
    public static int wolfSvens;
    public static int wolfTeeth;
    public static int wolfWheels;
    public static int wolfWheelsDrops;
    public static int wolfSpirits;
    public static int wolfBooks;
    public static int wolfEggs;
    public static int wolfCoutures;
    public static int wolfBaits;
    public static int wolfFluxes;
    public static double wolfTime;
    public static int wolfBosses;
    // Spider
    public static int spiderTarantulas;
    public static int spiderWebs;
    public static int spiderTAP;
    public static int spiderTAPDrops;
    public static int spiderBites;
    public static int spiderCatalysts;
    public static int spiderBooks;
    public static int spiderSwatters;
    public static int spiderTalismans;
    public static int spiderMosquitos;
    public static double spiderTime;
    public static int spiderBosses;
    // Zombie
    public static int zombieRevs;
    public static int zombieRevFlesh;
    public static int zombieRevViscera;
    public static int zombieFoulFlesh;
    public static int zombieFoulFleshDrops;
    public static int zombiePestilences;
    public static int zombieUndeadCatas;
    public static int zombieBooks;
    public static int zombieBeheadeds;
    public static int zombieRevCatas;
    public static int zombieSnakes;
    public static int zombieScythes;
    public static int zombieShards;
    public static int zombieWardenHearts;
    public static double zombieTime;
    public static int zombieBosses;
    // Enderman
    public static int endermanVoidglooms;
    public static int endermanNullSpheres;
    public static int endermanTAP;
    public static int endermanTAPDrops;
    public static int endermanEndersnakes;
    public static int endermanSummoningEyes;
    public static int endermanManaBooks;
    public static int endermanTuners;
    public static int endermanAtoms;
    public static int endermanEspressoMachines;
    public static int endermanSmartyBooks;
    public static int endermanEndRunes;
    public static int endermanChalices;
    public static int endermanDice;
    public static int endermanArtifacts;
    public static int endermanSkins;
    public static int endermanMergers;
    public static int endermanCores;
    public static int endermanEnchantRunes;
    public static int endermanEnderBooks;
    public static double endermanTime;
    public static int endermanBosses;

    // Fishing
    public static int seaCreatures;
    public static int goodCatches;
    public static int greatCatches;
    public static int squids;
    public static int seaWalkers;
    public static int nightSquids;
    public static int seaGuardians;
    public static int seaWitches;
    public static int seaArchers;
    public static int monsterOfTheDeeps;
    public static int catfishes;
    public static int carrotKings;
    public static int seaLeeches;
    public static int guardianDefenders;
    public static int deepSeaProtectors;
    public static int hydras;
    public static int seaEmperors;
    public static double empTime;
    public static int empSCs;
    public static int fishingMilestone;
    // Fishing Winter
    public static int frozenSteves;
    public static int frostyTheSnowmans;
    public static int grinches;
    public static int yetis;
    public static double yetiTime;
    public static int yetiSCs;
    // Fishing Festival
    public static int nurseSharks;
    public static int blueSharks;
    public static int tigerSharks;
    public static int greatWhiteSharks;
    // Spooky Fishing
    public static int scarecrows;
    public static int nightmares;
    public static int werewolfs;
    public static int phantomFishers;
    public static int grimReapers;

    // Mythological
    public static double mythCoins;
    public static int griffinFeathers;
    public static int crownOfGreeds;
    public static int washedUpSouvenirs;
    public static int minosHunters;
    public static int siameseLynxes;
    public static int minotaurs;
    public static int gaiaConstructs;
    public static int minosChampions;
    public static int minosInquisitors;

    // Catacombs Dungeons
    public static int recombobulators;
    public static int fumingPotatoBooks;
    // F1
    public static int bonzoStaffs;
    public static double f1CoinsSpent;
    public static double f1TimeSpent;
    // F2
    public static int scarfStudies;
    public static int adaptiveSwords;
    public static double f2CoinsSpent;
    public static double f2TimeSpent;
    // F3
    public static int adaptiveHelms;
    public static int adaptiveChests;
    public static int adaptiveLegs;
    public static int adaptiveBoots;
    public static double f3CoinsSpent;
    public static double f3TimeSpent;
    // F4
    public static int spiritWings;
    public static int spiritBones;
    public static int spiritBoots;
    public static int spiritSwords;
    public static int spiritBows;
    public static int epicSpiritPets;
    public static int legSpiritPets;
    public static double f4CoinsSpent;
    public static double f4TimeSpent;
    // F5
    public static int warpedStones;
    public static int shadowAssHelms;
    public static int shadowAssChests;
    public static int shadowAssLegs;
    public static int shadowAssBoots;
    public static int lastBreaths;
    public static int lividDaggers;
    public static int shadowFurys;
    public static double f5CoinsSpent;
    public static double f5TimeSpent;
    // F6
    public static int ancientRoses;
    public static int precursorEyes;
    public static int giantsSwords;
    public static int necroLordHelms;
    public static int necroLordChests;
    public static int necroLordLegs;
    public static int necroLordBoots;
    public static int necroSwords;
    public static double f6CoinsSpent;
    public static double f6TimeSpent;
    // F7
    public static int witherBloods;
    public static int witherCloaks;
    public static int implosions;
    public static int witherShields;
    public static int shadowWarps;
    public static int necronsHandles;
    public static int autoRecombs;
    public static int witherHelms;
    public static int witherChests;
    public static int witherLegs;
    public static int witherBoots;
    public static double f7CoinsSpent;
    public static double f7TimeSpent;
    // Ghosts
    public static int sorrows  = 0;
    public static int bagOfCashs  = 0;
    public static int voltas  = 0;
    public static int plasmas  = 0;
    public static int ghostlyBoots = 0;
    // public static double ghostsTimeSpent = -1;

    // Single sessions (No config saves)
    // Wolf
    public static int wolfSvensSession = 0;
    public static int wolfTeethSession = 0;
    public static int wolfWheelsSession = 0;
    public static int wolfWheelsDropsSession = 0;
    public static int wolfSpiritsSession = 0;
    public static int wolfBooksSession = 0;
    public static int wolfEggsSession = 0;
    public static int wolfCouturesSession = 0;
    public static int wolfBaitsSession = 0;
    public static int wolfFluxesSession = 0;
    public static double wolfTimeSession = -1;
    public static int wolfBossesSession = -1;
    // Spider
    public static int spiderTarantulasSession = 0;
    public static int spiderWebsSession = 0;
    public static int spiderTAPSession = 0;
    public static int spiderTAPDropsSession = 0;
    public static int spiderBitesSession = 0;
    public static int spiderCatalystsSession = 0;
    public static int spiderBooksSession = 0;
    public static int spiderSwattersSession = 0;
    public static int spiderTalismansSession = 0;
    public static int spiderMosquitosSession = 0;
    public static double spiderTimeSession = -1;
    public static int spiderBossesSession = -1;
    // Zombie
    public static int zombieRevsSession = 0;
    public static int zombieRevFleshSession = 0;
    public static int zombieRevVisceraSession = 0;
    public static int zombieFoulFleshSession = 0;
    public static int zombieFoulFleshDropsSession = 0;
    public static int zombiePestilencesSession = 0;
    public static int zombieUndeadCatasSession = 0;
    public static int zombieBooksSession = 0;
    public static int zombieBeheadedsSession = 0;
    public static int zombieRevCatasSession = 0;
    public static int zombieSnakesSession = 0;
    public static int zombieScythesSession = 0;
    public static int zombieShardsSession = 0;
    public static int zombieWardenHeartsSession = 0;
    public static double zombieTimeSession = -1;
    public static int zombieBossesSession = -1;
    // Enderman
    public static int endermanVoidgloomsSession = 0;
    public static int endermanNullSpheresSession = 0;
    public static int endermanTAPSession = 0;
    public static int endermanTAPDropsSession = 0;
    public static int endermanEndersnakesSession = 0;
    public static int endermanSummoningEyesSession = 0;
    public static int endermanManaBooksSession = 0;
    public static int endermanTunersSession = 0;
    public static int endermanAtomsSession = 0;
    public static int endermanEspressoMachinesSession = 0;
    public static int endermanSmartyBooksSession = 0;
    public static int endermanEndRunesSession = 0;
    public static int endermanChalicesSession = 0;
    public static int endermanDiceSession = 0;
    public static int endermanArtifactsSession = 0;
    public static int endermanSkinsSession = 0;
    public static int endermanMergersSession = 0;
    public static int endermanCoresSession = 0;
    public static int endermanEnchantRunesSession = 0;
    public static int endermanEnderBooksSession = 0;
    public static double endermanTimeSession = -1;
    public static int endermanBossesSession = -1;

    // Fishing
    public static int seaCreaturesSession = 0;
    public static int goodCatchesSession = 0;
    public static int greatCatchesSession = 0;
    public static int squidsSession = 0;
    public static int seaWalkersSession = 0;
    public static int nightSquidsSession = 0;
    public static int seaGuardiansSession = 0;
    public static int seaWitchesSession = 0;
    public static int seaArchersSession = 0;
    public static int monsterOfTheDeepsSession = 0;
    public static int catfishesSession = 0;
    public static int carrotKingsSession = 0;
    public static int seaLeechesSession = 0;
    public static int guardianDefendersSession = 0;
    public static int deepSeaProtectorsSession = 0;
    public static int hydrasSession = 0;
    public static int seaEmperorsSession = 0;
    public static double empTimeSession = -1;
    public static int empSCsSession = -1;
    public static int fishingMilestoneSession = 0;
    // Fishing Winter
    public static int frozenStevesSession = 0;
    public static int frostyTheSnowmansSession = 0;
    public static int grinchesSession = 0;
    public static int yetisSession = 0;
    public static double yetiTimeSession = -1;
    public static int yetiSCsSession = -1;
    // Fishing Festival
    public static int nurseSharksSession = 0;
    public static int blueSharksSession = 0;
    public static int tigerSharksSession = 0;
    public static int greatWhiteSharksSession = 0;
    // Spooky Fishing
    public static int scarecrowsSession = 0;
    public static int nightmaresSession = 0;
    public static int werewolfsSession = 0;
    public static int phantomFishersSession = 0;
    public static int grimReapersSession = 0;

    // Mythological
    public static double mythCoinsSession = 0;
    public static int griffinFeathersSession = 0;
    public static int crownOfGreedsSession = 0;
    public static int washedUpSouvenirsSession = 0;
    public static int minosHuntersSession = 0;
    public static int siameseLynxesSession = 0;
    public static int minotaursSession = 0;
    public static int gaiaConstructsSession = 0;
    public static int minosChampionsSession = 0;
    public static int minosInquisitorsSession = 0;

    // Catacombs Dungeons
    public static int recombobulatorsSession = 0;
    public static int fumingPotatoBooksSession = 0;
    // F1
    public static int bonzoStaffsSession = 0;
    public static double f1CoinsSpentSession = 0;
    public static double f1TimeSpentSession = 0;
    // F2
    public static int scarfStudiesSession = 0;
    public static int adaptiveSwordsSession = 0;
    public static double f2CoinsSpentSession = 0;
    public static double f2TimeSpentSession = 0;
    // F3
    public static int adaptiveHelmsSession = 0;
    public static int adaptiveChestsSession = 0;
    public static int adaptiveLegsSession = 0;
    public static int adaptiveBootsSession = 0;
    public static double f3CoinsSpentSession = 0;
    public static double f3TimeSpentSession = 0;
    // F4
    public static int spiritWingsSession = 0;
    public static int spiritBonesSession = 0;
    public static int spiritBootsSession = 0;
    public static int spiritSwordsSession = 0;
    public static int spiritBowsSession = 0;
    public static int epicSpiritPetsSession = 0;
    public static int legSpiritPetsSession = 0;
    public static double f4CoinsSpentSession = 0;
    public static double f4TimeSpentSession = 0;
    // F5
    public static int warpedStonesSession = 0;
    public static int shadowAssHelmsSession = 0;
    public static int shadowAssChestsSession = 0;
    public static int shadowAssLegsSession = 0;
    public static int shadowAssBootsSession = 0;
    public static int lastBreathsSession = 0;
    public static int lividDaggersSession = 0;
    public static int shadowFurysSession = 0;
    public static double f5CoinsSpentSession = 0;
    public static double f5TimeSpentSession = 0;
    // F6
    public static int ancientRosesSession = 0;
    public static int precursorEyesSession = 0;
    public static int giantsSwordsSession = 0;
    public static int necroLordHelmsSession = 0;
    public static int necroLordChestsSession = 0;
    public static int necroLordLegsSession = 0;
    public static int necroLordBootsSession = 0;
    public static int necroSwordsSession = 0;
    public static double f6CoinsSpentSession = 0;
    public static double f6TimeSpentSession = 0;
    // F7
    public static int witherBloodsSession = 0;
    public static int witherCloaksSession = 0;
    public static int implosionsSession = 0;
    public static int witherShieldsSession = 0;
    public static int shadowWarpsSession = 0;
    public static int necronsHandlesSession = 0;
    public static int autoRecombsSession = 0;
    public static int witherHelmsSession = 0;
    public static int witherChestsSession = 0;
    public static int witherLegsSession = 0;
    public static int witherBootsSession = 0;
    public static double f7CoinsSpentSession = 0;
    public static double f7TimeSpentSession = 0;
    // Ghosts
    public static int sorrowSession = 0;
    public static int bagOfCashSession = 0;
    public static int voltaSession = 0;
    public static int plasmaSession = 0;
    public static int ghostlyBootsSession = 0;
    // public static double ghostsSecondsSinceStarts = 0;

    static double checkItemsNow = 0;
    static double itemsChecked = 0;

    @SubscribeEvent(priority = EventPriority.HIGHEST)
    public void onChat(ClientChatReceivedEvent event) {
        String message = StringUtils.stripControlCodes(event.message.getUnformattedText());

        if (!Utils.inSkyblock) return;
        if (event.type == 2) return;
        if (message.contains(":")) return;

        boolean wolfRNG = false;
        boolean spiderRNG = false;
        boolean zombieRNG = false;
        boolean endermanRNG = false;

        // Slayer tracker
        // T6 books
        if (message.contains("VERY RARE DROP!  (Enchanted Book)") || message.contains("CRAZY RARE DROP!  (Enchanted Book)")) {
            // Loop through scoreboard to see what boss you're doing
            List<String> scoreboard = ScoreboardHandler.getSidebarLines();
            for (String s : scoreboard) {
                String sCleaned = ScoreboardHandler.cleanSB(s);
                if (sCleaned.contains("Sven Packmaster")) {
                    wolfBooks++;
                    ConfigHandler.writeIntConfig("wolf", "book", wolfBooks);
                } else if (sCleaned.contains("Tarantula Broodfather")) {
                    spiderBooks++;
                    ConfigHandler.writeIntConfig("spider", "book", spiderBooks);
                } else if (sCleaned.contains("Revenant Horror")) {
                    zombieBooks++;
                    ConfigHandler.writeIntConfig("zombie", "book", zombieBooks);
                }

            }
        }

        // Wolf
        if (message.contains("   Wolf Slayer LVL ")) {
            wolfSvens++;
            wolfSvensSession++;
            if (wolfBosses != -1) {
                wolfBosses++;
            }
            if (wolfBossesSession != -1) {
                wolfBossesSession++;
            }
            ConfigHandler.writeIntConfig("wolf", "svens", wolfSvens);
            ConfigHandler.writeIntConfig("wolf", "bossRNG", wolfBosses);
        } else if (message.contains("RARE DROP! (") && message.contains("Hamster Wheel)")) {
            int amount = getAmountfromMessage(message);
            wolfWheels += amount;
            wolfWheelsSession += amount;
            wolfWheelsDrops++;
            wolfWheelsDropsSession++;
            ConfigHandler.writeIntConfig("wolf", "wheel", wolfWheels);
            ConfigHandler.writeIntConfig("wolf", "wheelDrops", wolfWheelsDrops);
        } else if (message.contains("VERY RARE DROP!  (") && message.contains(" Spirit Rune I)")) { // Removing the unicode here *should* fix rune drops not counting
            wolfSpirits++;
            wolfSpiritsSession++;
            ConfigHandler.writeIntConfig("wolf", "spirit", wolfSpirits);
        } else if (message.contains("CRAZY RARE DROP!  (Red Claw Egg)")) {
            wolfRNG = true;
            wolfEggs++;
            wolfEggsSession++;
            ConfigHandler.writeIntConfig("wolf", "egg", wolfEggs);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_RED + "RED CLAW EGG!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (") && message.contains(" Couture Rune I)")) {
            wolfRNG = true;
            wolfCoutures++;
            wolfCouturesSession++;
            ConfigHandler.writeIntConfig("wolf", "couture", wolfCoutures);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "COUTURE RUNE!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (Grizzly Bait)") || message.contains("CRAZY RARE DROP! (Rename Me)")) { // How did Skyblock devs even manage to make this item Rename Me
            wolfRNG = true;
            wolfBaits++;
            wolfBaitsSession++;
            ConfigHandler.writeIntConfig("wolf", "bait", wolfBaits);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "GRIZZLY BAIT!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (Overflux Capacitor)")) {
            wolfRNG = true;
            wolfFluxes++;
            wolfFluxesSession++;
            ConfigHandler.writeIntConfig("wolf", "flux", wolfFluxes);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "OVERFLUX CAPACITOR!", 5);
        } else if (message.contains("   Spider Slayer LVL ")) { // Spider
            spiderTarantulas++;
            spiderTarantulasSession++;
            if (spiderBosses != -1) {
                spiderBosses++;
            }
            if (spiderBossesSession != -1) {
                spiderBossesSession++;
            }
            ConfigHandler.writeIntConfig("spider", "tarantulas", spiderTarantulas);
            ConfigHandler.writeIntConfig("spider", "bossRNG", spiderBosses);
        } else if (message.contains("RARE DROP! (") && message.contains("Toxic Arrow Poison)")) {
            int amount = getAmountfromMessage(message);
            spiderTAP += amount;
            spiderTAPSession += amount;
            spiderTAPDrops++;
            spiderTAPDropsSession++;
            ConfigHandler.writeIntConfig("spider", "tap", spiderTAP);
            ConfigHandler.writeIntConfig("spider", "tapDrops", spiderTAPDrops);
        } else if (message.contains("VERY RARE DROP!  (") && message.contains(" Bite Rune I)")) {
            spiderBites++;
            spiderBitesSession++;
            ConfigHandler.writeIntConfig("spider", "bite", spiderBites);
        } else if (message.contains("VERY RARE DROP!  (Spider Catalyst)")) {
            spiderCatalysts++;
            spiderCatalystsSession++;
            ConfigHandler.writeIntConfig("spider", "catalyst", spiderCatalysts);
        } else if (message.contains("CRAZY RARE DROP!  (Fly Swatter)")) {
            spiderRNG = true;
            spiderSwatters++;
            spiderSwattersSession++;
            ConfigHandler.writeIntConfig("spider", "swatter", spiderSwatters);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.LIGHT_PURPLE + "FLY SWATTER!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (Tarantula Talisman")) {
            spiderRNG = true;
            spiderTalismans++;
            spiderTalismansSession++;
            ConfigHandler.writeIntConfig("spider", "talisman", spiderTalismans);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "TARANTULA TALISMAN!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (Digested Mosquito)")) {
            spiderRNG = true;
            spiderMosquitos++;
            spiderMosquitosSession++;
            ConfigHandler.writeIntConfig("spider", "mosquito", spiderMosquitos);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "DIGESTED MOSQUITO!", 5);
        } else if (message.contains("   Zombie Slayer LVL ")) { // Zombie
            zombieRevs++;
            zombieRevsSession++;
            if (zombieBosses != -1) {
                zombieBosses++;
            }
            if (zombieBossesSession != 1) {
                zombieBossesSession++;
            }
            ConfigHandler.writeIntConfig("zombie", "revs", zombieRevs);
            ConfigHandler.writeIntConfig("zombie", "bossRNG", zombieBosses);
        } else if (message.contains("RARE DROP! (") && message.contains("Revenant Viscera)")) {
            int amount = getAmountfromMessage(message);
            zombieRevViscera += amount;
            zombieRevVisceraSession += amount;
            ConfigHandler.writeIntConfig("zombie", "revViscera", zombieRevViscera);
        } else if (message.contains("RARE DROP! (") && message.contains("Foul Flesh)")) {
            int amount = getAmountfromMessage(message);
            zombieFoulFlesh += amount;
            zombieFoulFleshSession += amount;
            zombieFoulFleshDrops++;
            zombieFoulFleshDropsSession++;
            ConfigHandler.writeIntConfig("zombie", "foulFlesh", zombieFoulFlesh);
            ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", zombieFoulFleshDrops);
        } else if (message.contains("VERY RARE DROP!  (Revenant Catalyst)")) {
            zombieRevCatas++;
            zombieRevCatasSession++;
            ConfigHandler.writeIntConfig("zombie", "revCatalyst", zombieRevCatas);
        } else if (message.contains("VERY RARE DROP!  (") && message.contains(" Pestilence Rune I)")) {
            zombiePestilences++;
            zombiePestilencesSession++;
            ConfigHandler.writeIntConfig("zombie", "pestilence", zombiePestilences);
        } else if (message.contains("VERY RARE DROP!  (Undead Catalyst)")) {
            zombieUndeadCatas++;
            zombieUndeadCatasSession++;
            ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", zombieUndeadCatas);
        } else if (message.contains("CRAZY RARE DROP!  (Beheaded Horror)")) {
            zombieRNG = true;
            zombieBeheadeds++;
            zombieBeheadedsSession++;
            ConfigHandler.writeIntConfig("zombie", "beheaded", zombieBeheadeds);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (") && message.contains(" Snake Rune I)")) {
            zombieRNG = true;
            zombieSnakes++;
            zombieSnakesSession++;
            ConfigHandler.writeIntConfig("zombie", "snake", zombieSnakes);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (Scythe Blade)")) {
            zombieRNG = true;
            zombieScythes++;
            zombieScythesSession++;
            ConfigHandler.writeIntConfig("zombie", "scythe", zombieScythes);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5);
        } else if (message.contains("CRAZY RARE DROP!  (Shard of the Shredded)")) {
            zombieRNG = true;
            zombieShards++;
            zombieShardsSession++;
            ConfigHandler.writeIntConfig("zombie", "shard", zombieShards);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "SHARD OF THE SHREDDED!", 5);
        } else if (message.contains("INSANE DROP!  (Warden Heart)") || message.contains("CRAZY RARE DROP!  (Warden Heart)")) {
            zombieRNG = true;
            zombieWardenHearts++;
            zombieWardenHeartsSession++;
            ConfigHandler.writeIntConfig("zombie", "heart", zombieWardenHearts);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "WARDEN HEART!", 5);
        } else if (message.contains("   Enderman Slayer LVL ")) {
            endermanVoidglooms++;
            endermanVoidgloomsSession++;
            if (endermanBosses != -1) {
                endermanBosses++;
            }
            if (endermanBossesSession != -1) {
                endermanBossesSession++;
            }
            ConfigHandler.writeIntConfig("enderman", "voidglooms", endermanVoidglooms);
            ConfigHandler.writeIntConfig("enderman", "bossRNG", endermanBosses);
        } else if (message.contains("RARE DROP! (") && message.contains("Twilight Arrow Poison)")) {
            int amount = getAmountfromMessage(message);
            endermanTAP += amount;
            endermanTAPSession += amount;
            endermanTAPDrops++;
            endermanTAPDropsSession++;
            ConfigHandler.writeIntConfig("enderman", "tap", endermanTAP);
            ConfigHandler.writeIntConfig("enderman", "tapDrops", endermanTAPDrops);
        } else if (message.contains("VERY RARE DROP!  (") && message.contains(" Endersnake Rune I)")) {
            endermanEndersnakes++;
            endermanEndersnakesSession++;
            ConfigHandler.writeIntConfig("enderman", "endersnakes", endermanEndersnakes);
        } else if (message.contains("VERY RARE DROP!  (Summoning Eye)")) {
            endermanSummoningEyes++;
            endermanSummoningEyesSession++;
            ConfigHandler.writeIntConfig("enderman", "summoningEyes", endermanSummoningEyes);
        } else if (message.contains("VERY RARE DROP!  (Mana Steal I)")) {
            endermanManaBooks++;
            endermanManaBooksSession++;
            ConfigHandler.writeIntConfig("enderman", "manaBooks", endermanManaBooks);
        } else if (message.contains("VERY RARE DROP!  (Transmission Tuner)")) {
            endermanTuners++;
            endermanTunersSession++;
            ConfigHandler.writeIntConfig("enderman", "tuners", endermanTuners);
        } else if (message.contains("VERY RARE DROP!  (Null Atom)")) {
            endermanAtoms++;
            endermanAtomsSession++;
            ConfigHandler.writeIntConfig("enderman", "atoms", endermanAtoms);
        } else if (message.contains("CRAZY RARE DROP!  (Pocket Espresso Machine)")) {
            endermanRNG = true;
            endermanEspressoMachines++;
            endermanEspressoMachinesSession++;
            ConfigHandler.writeIntConfig("enderman", "espressoMachines", endermanEspressoMachines);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "POCKET ESPRESSO MACHINE!", 3);
        } else if (message.contains("VERY RARE DROP!  (Smarty Pants I)")) {
            endermanSmartyBooks++;
            endermanSmartyBooksSession++;
            ConfigHandler.writeIntConfig("enderman", "smartyBooks", endermanSmartyBooks);
        } else if (message.contains("VERY RARE DROP!  (") && message.contains(" End Rune I)")) {
            endermanEndRunes++;
            endermanEndRunesSession++;
            ConfigHandler.writeIntConfig("enderman", "endRunes", endermanEndRunes);
        } else if (message.contains("CRAZY RARE DROP!  (Handy Blood Chalice)")) {
            endermanRNG = true;
            endermanChalices++;
            endermanChalicesSession++;
            ConfigHandler.writeIntConfig("enderman", "chalices", endermanChalices);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "HANDY BLOOD CHALICE!", 3);
        } else if (message.contains("VERY RARE DROP!  (Sinful Dice)")) {
            endermanDice++;
            endermanDiceSession++;
            ConfigHandler.writeIntConfig("enderman", "dice", endermanDice);
        } else if (message.contains("CRAZY RARE DROP!  (Exceedingly Rare Ender Artifact Upgrader)")) {
            endermanRNG = true;
            endermanArtifacts++;
            endermanArtifactsSession++;
            ConfigHandler.writeIntConfig("enderman", "artifacts", endermanArtifacts);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "ENDER ARTIFACT UPGRADER!", 3);
        } else if (message.contains("CRAZY RARE DROP!  (Void Conqueror Enderman Skin)")) {
            endermanRNG = true;
            endermanSkins++;
            endermanSkinsSession++;
            ConfigHandler.writeIntConfig("enderman", "skins", endermanSkins);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "ENDERMAN SKIN!", 3);
        } else if (message.contains("VERY RARE DROP!  (Etherwarp Merger)")) {
            endermanMergers++;
            endermanMergersSession++;
            ConfigHandler.writeIntConfig("enderman", "mergers", endermanMergers);
        } else if (message.contains("CRAZY RARE DROP!  (Judgement Core)")) {
            endermanRNG = true;
            endermanCores++;
            endermanCoresSession++;
            ConfigHandler.writeIntConfig("enderman", "cores", endermanCores);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "JUDGEMENT CORE!", 5);
        } else if (message.contains("CRAZY RARE DROP!  (") && message.contains(" Enchant Rune I)")) {
            endermanRNG = true;
            endermanEnchantRunes++;
            endermanEnchantRunesSession++;
            ConfigHandler.writeIntConfig("enderman", "enchantRunes", endermanEnchantRunes);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GRAY + "ENCHANT RUNE!", 3);
        } else if (message.contains("INSANE DROP!  (Ender Slayer VII)") || message.contains("CRAZY RARE DROP!  (Ender Slayer VII)")) {
            endermanRNG = true;
            endermanEnderBooks++;
            endermanEnderBooksSession++;
            ConfigHandler.writeIntConfig("enderman", "enderBooks", endermanEnderBooks);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "ENDER SLAYER VII!", 3);
        }

        if (wolfRNG) {
            wolfTime = System.currentTimeMillis() / 1000;
            wolfBosses = 0;
            wolfTimeSession = System.currentTimeMillis() / 1000;
            wolfBossesSession = 0;
            ConfigHandler.writeDoubleConfig("wolf", "timeRNG", wolfTime);
            ConfigHandler.writeIntConfig("wolf", "bossRNG", 0);
        }
        if (spiderRNG) {
            spiderTime = System.currentTimeMillis() / 1000;
            spiderBosses = 0;
            spiderTimeSession = System.currentTimeMillis() / 1000;
            spiderBossesSession = 0;
            ConfigHandler.writeDoubleConfig("spider", "timeRNG", spiderTime);
            ConfigHandler.writeIntConfig("spider", "bossRNG", 0);
        }
        if (zombieRNG) {
            zombieTime = System.currentTimeMillis() / 1000;
            zombieBosses = 0;
            zombieTimeSession = System.currentTimeMillis() / 1000;
            zombieBossesSession = 0;
            ConfigHandler.writeDoubleConfig("zombie", "timeRNG", zombieTime);
            ConfigHandler.writeIntConfig("zombie", "bossRNG", 0);
        }
        if (endermanRNG) {
            endermanTime = System.currentTimeMillis() / 1000;
            endermanBosses = 0;
            endermanTimeSession = System.currentTimeMillis() / 1000;
            endermanBossesSession = 0;
            ConfigHandler.writeDoubleConfig("enderman", "timeRNG", endermanTime);
            ConfigHandler.writeIntConfig("enderman", "bossRNG", 0);
        }

        // Fishing tracker
        if (message.contains("GOOD CATCH!")) {
            goodCatches++;
            goodCatchesSession++;
            ConfigHandler.writeIntConfig("fishing", "goodCatch", goodCatches);
        } else if (message.contains("GREAT CATCH!")) {
            greatCatches++;
            greatCatchesSession++;
            ConfigHandler.writeIntConfig("fishing", "greatCatch", greatCatches);
        } else if (message.contains("A Squid appeared")) {
            squids++;
            squidsSession++;
            ConfigHandler.writeIntConfig("fishing", "squid", squids);
            increaseSeaCreatures();
        } else if (message.contains("You caught a Sea Walker")) {
            seaWalkers++;
            seaWalkersSession++;
            ConfigHandler.writeIntConfig("fishing", "seaWalker", seaWalkers);
            increaseSeaCreatures();
        } else if (message.contains("Pitch darkness reveals a Night Squid")) {
            nightSquids++;
            nightSquidsSession++;
            ConfigHandler.writeIntConfig("fishing", "nightSquid", nightSquids);
            increaseSeaCreatures();
        } else if (message.contains("You stumbled upon a Sea Guardian")) {
            seaGuardians++;
            seaGuardiansSession++;
            ConfigHandler.writeIntConfig("fishing", "seaGuardian", seaGuardians);
            increaseSeaCreatures();
        } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) {
            seaWitches++;
            seaWitchesSession++;
            ConfigHandler.writeIntConfig("fishing", "seaWitch", seaWitches);
            increaseSeaCreatures();
        } else if (message.contains("You reeled in a Sea Archer")) {
            seaArchers++;
            seaArchersSession++;
            ConfigHandler.writeIntConfig("fishing", "seaArcher", seaArchers);
            increaseSeaCreatures();
        } else if (message.contains("The Monster of the Deep has emerged")) {
            monsterOfTheDeeps++;
            monsterOfTheDeepsSession++;
            ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", monsterOfTheDeeps);
            increaseSeaCreatures();
        } else if (message.contains("Huh? A Catfish")) {
            catfishes++;
            catfishesSession++;
            ConfigHandler.writeIntConfig("fishing", "catfish", catfishes);
            increaseSeaCreatures();
        } else if (message.contains("Is this even a fish? It's the Carrot King")) {
            carrotKings++;
            carrotKingsSession++;
            ConfigHandler.writeIntConfig("fishing", "carrotKing", carrotKings);
            increaseSeaCreatures();
        } else if (message.contains("Gross! A Sea Leech")) {
            seaLeeches++;
            seaLeechesSession++;
            ConfigHandler.writeIntConfig("fishing", "seaLeech", seaLeeches);
            increaseSeaCreatures();
        } else if (message.contains("You've discovered a Guardian Defender of the sea")) {
            guardianDefenders++;
            guardianDefendersSession++;
            ConfigHandler.writeIntConfig("fishing", "guardianDefender", guardianDefenders);
            increaseSeaCreatures();
        } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) {
            deepSeaProtectors++;
            deepSeaProtectorsSession++;
            ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", deepSeaProtectors);
            increaseSeaCreatures();
        } else if (message.contains("The Water Hydra has come to test your strength")) {
            hydras++;
            hydrasSession++;
            ConfigHandler.writeIntConfig("fishing", "hydra", hydras);
            increaseSeaCreatures();
        } else if (message.contains("The Sea Emperor arises from the depths")) {
            increaseSeaCreatures();

            seaEmperors++;
            empTime = System.currentTimeMillis() / 1000;
            empSCs = 0;
            seaEmperorsSession++;
            empTimeSession = System.currentTimeMillis() / 1000;
            empSCsSession = 0;
            ConfigHandler.writeIntConfig("fishing", "seaEmperor", seaEmperors);
            ConfigHandler.writeDoubleConfig("fishing", "empTime", empTime);
            ConfigHandler.writeIntConfig("fishing", "empSC", empSCs);
        } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter
            frozenSteves++;
            frozenStevesSession++;
            ConfigHandler.writeIntConfig("fishing", "frozenSteve", frozenSteves);
            increaseSeaCreatures();
        } else if (message.contains("It's a snowman! He looks harmless")) {
            frostyTheSnowmans++;
            frostyTheSnowmansSession++;
            ConfigHandler.writeIntConfig("fishing", "snowman", frostyTheSnowmans);
            increaseSeaCreatures();
        } else if (message.contains("stole Jerry's Gifts...get them back")) {
            grinches++;
            grinchesSession++;
            ConfigHandler.writeIntConfig("fishing", "grinch", grinches);
            increaseSeaCreatures();
        } else if (message.contains("What is this creature")) {
            yetis++;
            yetiTime = System.currentTimeMillis() / 1000;
            yetiSCs = 0;
            yetisSession++;
            yetiTimeSession = System.currentTimeMillis() / 1000;
            yetiSCsSession = 0;
            ConfigHandler.writeIntConfig("fishing", "yeti", yetis);
            ConfigHandler.writeDoubleConfig("fishing", "yetiTime", yetiTime);
            ConfigHandler.writeIntConfig("fishing", "yetiSC", yetiSCs);
            increaseSeaCreatures();
        } else if (message.contains("A tiny fin emerges from the water, you've caught a Nurse Shark")) { // Fishing Festival
            nurseSharks++;
            nurseSharksSession++;
            ConfigHandler.writeIntConfig("fishing", "nurseShark", nurseSharks);
            increaseSeaCreatures();
        } else if (message.contains("You spot a fin as blue as the water it came from, it's a Blue Shark")) {
            blueSharks++;
            blueSharksSession++;
            ConfigHandler.writeIntConfig("fishing", "blueShark", blueSharks);
            increaseSeaCreatures();
        } else if (message.contains("A striped beast bounds from the depths, the wild Tiger Shark")) {
            tigerSharks++;
            tigerSharksSession++;
            ConfigHandler.writeIntConfig("fishing", "tigerShark", tigerSharks);
            increaseSeaCreatures();
        } else if (message.contains("Hide no longer, a Great White Shark has tracked your scent and thirsts for your blood")) {
            greatWhiteSharks++;
            greatWhiteSharksSession++;
            ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", greatWhiteSharks);
            increaseSeaCreatures();
        } else if (message.contains("Phew! It's only a Scarecrow")) {
            scarecrows++;
            scarecrowsSession++;
            ConfigHandler.writeIntConfig("fishing", "scarecrow", scarecrows);
            increaseSeaCreatures();
        } else if (message.contains("You hear trotting from beneath the waves, you caught a Nightmare")) {
            nightmares++;
            nightmaresSession++;
            ConfigHandler.writeIntConfig("fishing", "nightmare", nightmares);
            increaseSeaCreatures();
        } else if (message.contains("It must be a full moon, a Werewolf appears")) {
            werewolfs++;
            werewolfsSession++;
            ConfigHandler.writeIntConfig("fishing", "werewolf", werewolfs);
            increaseSeaCreatures();
        } else if (message.contains("The spirit of a long lost Phantom Fisher has come to haunt you")) {
            phantomFishers++;
            phantomFishersSession++;
            ConfigHandler.writeIntConfig("fishing", "phantomFisher", phantomFishers);
            increaseSeaCreatures();
        } else if (message.contains("This can't be! The manifestation of death himself")) {
            grimReapers++;
            grimReapersSession++;
            ConfigHandler.writeIntConfig("fishing", "grimReaper", grimReapers);
            increaseSeaCreatures();
        }

        // Dungeons tracker
        if (message.contains("    ")) {
            if (message.contains("Recombobulator 3000")) {
                recombobulators++;
                recombobulatorsSession++;
                ConfigHandler.writeIntConfig("catacombs", "recombobulator", recombobulators);
            } else if (message.contains("Fuming Potato Book")) {
                fumingPotatoBooks++;
                fumingPotatoBooksSession++;
                ConfigHandler.writeIntConfig("catacombs", "fumingBooks", fumingPotatoBooks);
            } else if (message.contains("Bonzo's Staff")) { // F1
                bonzoStaffs++;
                bonzoStaffsSession++;
                ConfigHandler.writeIntConfig("catacombs", "bonzoStaff", bonzoStaffs);
            } else if (message.contains("Scarf's Studies")) { // F2
                scarfStudies++;
                scarfStudiesSession++;
                ConfigHandler.writeIntConfig("catacombs", "scarfStudies", scarfStudies);
            } else if (message.contains("Adaptive Helmet")) { // F3
                adaptiveHelms++;
                adaptiveHelmsSession++;
                ConfigHandler.writeIntConfig("catacombs", "adaptiveHelm", adaptiveHelms);
            } else if (message.contains("Adaptive Chestplate")) {
                adaptiveChests++;
                adaptiveChestsSession++;
                ConfigHandler.writeIntConfig("catacombs", "adaptiveChest", adaptiveChests);
            } else if (message.contains("Adaptive Leggings")) {
                adaptiveLegs++;
                adaptiveLegsSession++;
                ConfigHandler.writeIntConfig("catacombs", "adaptiveLegging", adaptiveLegs);
            } else if (message.contains("Adaptive Boots")) {
                adaptiveBoots++;
                adaptiveBootsSession++;
                ConfigHandler.writeIntConfig("catacombs", "adaptiveBoot", adaptiveBoots);
            } else if (message.contains("Adaptive Blade")) {
                adaptiveSwords++;
                adaptiveSwordsSession++;
                ConfigHandler.writeIntConfig("catacombs", "adaptiveSword", adaptiveSwords);
            } else if (message.contains("Spirit Wing")) { // F4
                spiritWings++;
                spiritWingsSession++;
                ConfigHandler.writeIntConfig("catacombs", "spiritWing", spiritWings);
            } else if (message.contains("Spirit Bone")) {
                spiritBones++;
                spiritBonesSession++;
                ConfigHandler.writeIntConfig("catacombs", "spiritBone", spiritBones);
            } else if (message.contains("Spirit Boots")) {
                spiritBoots++;
                spiritBootsSession++;
                ConfigHandler.writeIntConfig("catacombs", "spiritBoot", spiritBoots);
            } else if (message.contains("[Lvl 1] Spirit")) {
                String formattedMessage = event.message.getFormattedText();
                // Unicode colour code messes up here, just gonna remove the symbols
                if (formattedMessage.contains("5Spirit")) {
                    epicSpiritPets++;
                    epicSpiritPetsSession++;
                    ConfigHandler.writeIntConfig("catacombs", "spiritPetEpic", epicSpiritPets);
                } else if (formattedMessage.contains("6Spirit")) {
                    legSpiritPets++;
                    legSpiritPetsSession++;
                    ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", legSpiritPets);
                }
            } else if (message.contains("Spirit Sword")) {
                spiritSwords++;
                spiritSwordsSession++;
                ConfigHandler.writeIntConfig("catacombs", "spiritSword", spiritSwords);
            } else if (message.contains("Spirit Bow")) {
                spiritBows++;
                spiritBowsSession++;
                ConfigHandler.writeIntConfig("catacombs", "spiritBow", spiritBows);
            } else if (message.contains("Warped Stone")) { // F5
                warpedStones++;
                warpedStonesSession++;
                ConfigHandler.writeIntConfig("catacombs", "warpedStone", warpedStones);
            } else if (message.contains("Shadow Assassin Helmet")) {
                shadowAssHelms++;
                shadowAssHelmsSession++;
                ConfigHandler.writeIntConfig("catacombs", "shadowAssassinHelm", shadowAssHelms);
            } else if (message.contains("Shadow Assassin Chestplate")) {
                shadowAssChests++;
                shadowAssChestsSession++;
                ConfigHandler.writeIntConfig("catacombs", "shadowAssassinChest", shadowAssChests);
            } else if (message.contains("Shadow Assassin Leggings")) {
                shadowAssLegs++;
                shadowAssLegsSession++;
                ConfigHandler.writeIntConfig("catacombs", "shadowAssassinLegging", shadowAssLegs);
            } else if (message.contains("Shadow Assassin Boots")) {
                shadowAssBoots++;
                shadowAssBootsSession++;
                ConfigHandler.writeIntConfig("catacombs", "shadowAssassinBoot", shadowAssBoots);
            } else if (message.contains("Livid Dagger")) {
                lividDaggers++;
                lividDaggersSession++;
                ConfigHandler.writeIntConfig("catacombs", "lividDagger", lividDaggers);
            } else if (message.contains("Shadow Fury")) {
                shadowFurys++;
                shadowFurysSession++;
                ConfigHandler.writeIntConfig("catacombs", "shadowFury", shadowFurys);
            } else if (message.contains("Ancient Rose")) { // F6
                ancientRoses++;
                ancientRosesSession++;
                ConfigHandler.writeIntConfig("catacombs", "ancientRose", ancientRoses);
            } else if (message.contains("Precursor Eye")) {
                precursorEyes++;
                precursorEyesSession++;
                ConfigHandler.writeIntConfig("catacombs", "precursorEye", precursorEyes);
            } else if (message.contains("Giant's Sword")) {
                giantsSwords++;
                giantsSwordsSession++;
                ConfigHandler.writeIntConfig("catacombs", "giantsSword", giantsSwords);
            } else if (message.contains("Necromancer Lord Helmet")) {
                necroLordHelms++;
                necroLordHelmsSession++;
                ConfigHandler.writeIntConfig("catacombs", "necroLordHelm", necroLordHelms);
            } else if (message.contains("Necromancer Lord Chestplate")) {
                necroLordChests++;
                necroLordChestsSession++;
                ConfigHandler.writeIntConfig("catacombs", "necroLordChest", necroLordChests);
            } else if (message.contains("Necromancer Lord Leggings")) {
                necroLordLegs++;
                necroLordLegsSession++;
                ConfigHandler.writeIntConfig("catacombs", "necroLordLegging", necroLordLegs);
            } else if (message.contains("Necromancer Lord Boots")) {
                necroLordBoots++;
                necroLordBootsSession++;
                ConfigHandler.writeIntConfig("catacombs", "necroLordBoot", necroLordBoots);
            } else if (message.contains("Necromancer Sword")) {
                necroSwords++;
                necroSwordsSession++;
                ConfigHandler.writeIntConfig("catacombs", "necroSword", necroSwords);
            } else if (message.contains("Wither Blood")) { // F7
                witherBloods++;
                witherBloodsSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherBlood", witherBloods);
            } else if (message.contains("Wither Cloak")) {
                witherCloaks++;
                witherCloaksSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherCloak", witherCloaks);
            } else if (message.contains("Implosion")) {
                implosions++;
                implosionsSession++;
                ConfigHandler.writeIntConfig("catacombs", "implosion", implosions);
            } else if (message.contains("Wither Shield")) {
                witherShields++;
                witherShieldsSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherShield", witherShields);
            } else if (message.contains("Shadow Warp")) {
                shadowWarps++;
                shadowWarpsSession++;
                ConfigHandler.writeIntConfig("catacombs", "shadowWarp", shadowWarps);
            } else if (message.contains("Necron's Handle")) {
                necronsHandles++;
                necronsHandlesSession++;
                ConfigHandler.writeIntConfig("catacombs", "necronsHandle", necronsHandles);
            } else if (message.contains("Auto Recombobulator")) {
                autoRecombs++;
                autoRecombsSession++;
                ConfigHandler.writeIntConfig("catacombs", "autoRecomb", autoRecombs);
            } else if (message.contains("Wither Helmet")) {
                witherHelms++;
                witherHelmsSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherHelm", witherHelms);
            } else if (message.contains("Wither Chestplate")) {
                witherChests++;
                witherChestsSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherChest", witherChests);
            } else if (message.contains("Wither Leggings")) {
                witherLegs++;
                witherLegsSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherLegging", witherLegs);
            } else if (message.contains("Wither Boots")) {
                witherBoots++;
                witherBootsSession++;
                ConfigHandler.writeIntConfig("catacombs", "witherBoot", witherBoots);
            }
        }

        if (message.contains("EXTRA STATS ")) {
            List<String> scoreboard = ScoreboardHandler.getSidebarLines();
            int timeToAdd = 0;
            for (String s : scoreboard) {
                String sCleaned = ScoreboardHandler.cleanSB(s);
                if (sCleaned.contains("The Catacombs (")) {
                    // Add time to floor
                    if (sCleaned.contains("F1")) {
                        f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd);
                        f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent);
                    } else if (sCleaned.contains("F2")) {
                        f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd);
                        f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent);
                    } else if (sCleaned.contains("F3")) {
                        f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd);
                        f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent);
                    } else if (sCleaned.contains("F4")) {
                        f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd);
                        f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent);
                    } else if (sCleaned.contains("F5")) {
                        f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd);
                        f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent);
                    } else if (sCleaned.contains("F6")) {
                        f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd);
                        f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent);
                    } else if (sCleaned.contains("F7")) {
                        f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd);
                        f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd);
                        ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent);
                    }
                } else if (sCleaned.contains("Time Elapsed:")) {
                    // Get floor time
                    String time = sCleaned.substring(sCleaned.indexOf(":") + 2);
                    time = time.replaceAll("\\s", "");
                    int minutes = Integer.parseInt(time.substring(0, time.indexOf("m")));
                    int seconds = Integer.parseInt(time.substring(time.indexOf("m") + 1, time.indexOf("s")));
                    timeToAdd = (minutes * 60) + seconds;
                }
            }
        }

        // Mythological Tracker
        if (message.contains("You dug out")) {
            if (message.contains(" coins!")) {
                double coinsEarned = Double.parseDouble(message.replaceAll("[^\\d]", ""));
                mythCoins += coinsEarned;
                mythCoinsSession += coinsEarned;
                ConfigHandler.writeDoubleConfig("mythological", "coins", mythCoins);
            } else if (message.contains("a Griffin Feather!")) {
                griffinFeathers++;
                griffinFeathersSession++;
                ConfigHandler.writeIntConfig("mythological", "griffinFeather", griffinFeathers);
            } else if (message.contains("a Crown of Greed!")) {
                crownOfGreeds++;
                crownOfGreedsSession++;
                ConfigHandler.writeIntConfig("mythological", "crownOfGreed", crownOfGreeds);
            } else if (message.contains("a Washed-up Souvenir!")) {
                washedUpSouvenirs++;
                washedUpSouvenirsSession++;
                ConfigHandler.writeIntConfig("mythological", "washedUpSouvenir", washedUpSouvenirs);
            } else if (message.contains("a Minos Hunter!")) {
                minosHunters++;
                minosHuntersSession++;
                ConfigHandler.writeIntConfig("mythological", "minosHunter", minosHunters);
            } else if (message.contains("Siamese Lynxes!")) {
                siameseLynxes++;
                siameseLynxesSession++;
                ConfigHandler.writeIntConfig("mythological", "siameseLynx", siameseLynxes);
            } else if (message.contains("a Minotaur!")) {
                minotaurs++;
                minotaursSession++;
                ConfigHandler.writeIntConfig("mythological", "minotaur", minotaurs);
            } else if (message.contains("a Gaia Construct!")) {
                gaiaConstructs++;
                gaiaConstructsSession++;
                ConfigHandler.writeIntConfig("mythological", "gaiaConstruct", gaiaConstructs);
            } else if (message.contains("a Minos Champion!")) {
                minosChampions++;
                minosChampionsSession++;
                ConfigHandler.writeIntConfig("mythological", "minosChampion", minosChampions);
            } else if (message.contains("a Minos Inquisitor!")) {
                minosInquisitors++;
                minosInquisitorsSession++;
                ConfigHandler.writeIntConfig("mythological", "minosInquisitor", minosInquisitors);
            }
        }


        if (message.contains("RARE DROP!")) {
                if (message.contains("Sorrow")) {
                    sorrows++;
                    sorrowSession++;
                    ConfigHandler.writeIntConfig("ghosts", "sorrow", sorrows);
                }
                if (message.contains("Volta")) {
                    voltas++;
                    voltaSession++;
                    ConfigHandler.writeIntConfig("ghosts", "volta", voltas);
                }
                if (message.contains("Plasma")) {
                    plasmas++;
                    plasmaSession++;
                    ConfigHandler.writeIntConfig("ghosts", "plasma", plasmas);
                }
                if (message.contains("Ghostly Boots")) {
                    ghostlyBoots++;
                    ghostlyBootsSession++;
                    ConfigHandler.writeIntConfig("ghosts", "ghostlyBoots", ghostlyBoots);
                }
                if (message.contains("The ghost's death materialized ")) {
                    bagOfCashs++;
                    bagOfCashSession++;
                    ConfigHandler.writeIntConfig("ghosts", "bagOfCash", bagOfCashs);
                }
            }
    }

    @SubscribeEvent
    public void onSlotClick(ChestSlotClickedEvent event) {
        ItemStack item = event.item;

        if (event.inventoryName.endsWith(" Chest") && item != null && item.getDisplayName().contains("Open Reward Chest")) {
            List<String> tooltip = item.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips);
            for (String lineUnclean : tooltip) {
                String line = StringUtils.stripControlCodes(lineUnclean);
                if (line.contains("FREE")) {
                    break;
                } else if (line.contains(" Coins")) {
                    int coinsSpent = Integer.parseInt(line.substring(0, line.indexOf(" ")).replaceAll(",", ""));

                    List<String> scoreboard = ScoreboardHandler.getSidebarLines();
                    for (String s : scoreboard) {
                        String sCleaned = ScoreboardHandler.cleanSB(s);
                        if (sCleaned.contains("The Catacombs (")) {
                            if (sCleaned.contains("F1")) {
                                f1CoinsSpent += coinsSpent;
                                f1CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent);
                            } else if (sCleaned.contains("F2")) {
                                f2CoinsSpent += coinsSpent;
                                f2CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent);
                            } else if (sCleaned.contains("F3")) {
                                f3CoinsSpent += coinsSpent;
                                f3CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent);
                            } else if (sCleaned.contains("F4")) {
                                f4CoinsSpent += coinsSpent;
                                f4CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent);
                            } else if (sCleaned.contains("F5")) {
                                f5CoinsSpent += coinsSpent;
                                f5CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent);
                            } else if (sCleaned.contains("F6")) {
                                f6CoinsSpent += coinsSpent;
                                f6CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent);
                            } else if (sCleaned.contains("F7")) {
                                f7CoinsSpent += coinsSpent;
                                f7CoinsSpentSession += coinsSpent;
                                ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent);
                            }
                            break;
                        }
                    }
                    break;
                }
            }
        }
    }

    @SubscribeEvent(priority = EventPriority.HIGHEST)
    public void onSound(PlaySoundEvent event) {
        if (!Utils.inSkyblock) return;
        if (event.name.equals("note.pling")) {
            // Don't check twice within 3 seconds
            checkItemsNow = System.currentTimeMillis() / 1000;
            if (checkItemsNow - itemsChecked < 3) return;

            List<String> scoreboard = ScoreboardHandler.getSidebarLines();

            for (String line : scoreboard) {
                String cleanedLine = ScoreboardHandler.cleanSB(line);
                // If Hypixel lags and scoreboard doesn't update
                if (cleanedLine.contains("Boss slain!") || cleanedLine.contains("Slay the boss!")) {
                    int itemTeeth = Utils.getItems("Wolf Tooth");
                    int itemWebs = Utils.getItems("Tarantula Web");
                    int itemRev = Utils.getItems("Revenant Flesh");
                    int itemNullSphere = Utils.getItems("Null Sphere");

                    // If no items, are detected, allow check again. Should fix items not being found
                    if (itemTeeth + itemWebs + itemRev + itemNullSphere > 0) {
                        itemsChecked = System.currentTimeMillis() / 1000;
                        wolfTeeth += itemTeeth;
                        spiderWebs += itemWebs;
                        zombieRevFlesh += itemRev;
                        endermanNullSpheres += itemNullSphere;
                        wolfTeethSession += itemTeeth;
                        spiderWebsSession += itemWebs;
                        zombieRevFleshSession += itemRev;
                        endermanNullSpheresSession += itemNullSphere;

                        ConfigHandler.writeIntConfig("wolf", "teeth", wolfTeeth);
                        ConfigHandler.writeIntConfig("spider", "web", spiderWebs);
                        ConfigHandler.writeIntConfig("zombie", "revFlesh", zombieRevFlesh);
                        ConfigHandler.writeIntConfig("enderman", "nullSpheres", endermanNullSpheres);
                    }
                }
            }
        }
    }
    
    public void increaseSeaCreatures() {
        if (empSCs != -1) {
            empSCs++;
        }
        if (empSCsSession != -1) {
            empSCsSession++;
        }
        // Only increment Yetis when in Jerry's Workshop
        List<String> scoreboard = ScoreboardHandler.getSidebarLines();
        for (String s : scoreboard) {
            String sCleaned = ScoreboardHandler.cleanSB(s);
            if (sCleaned.contains("Jerry's Workshop") || sCleaned.contains("Jerry Pond")) {
                if (yetiSCs != -1) {
                    yetiSCs++;
                }
                if (yetiSCsSession != -1) {
                    yetiSCsSession++;
                }
            }
        }

        seaCreatures++;
        fishingMilestone++;
        seaCreaturesSession++;
        fishingMilestoneSession++;
        ConfigHandler.writeIntConfig("fishing", "seaCreature", seaCreatures);
        ConfigHandler.writeIntConfig("fishing", "milestone", fishingMilestone);
        ConfigHandler.writeIntConfig("fishing", "empSC", empSCs);
        ConfigHandler.writeIntConfig("fishing", "yetiSC", yetiSCs);
    }

    public int getAmountfromMessage(String message) {
        if (message.charAt(message.indexOf("(") + 2) == 'x') {
            return Integer.parseInt(message.substring(message.indexOf("(") + 1, message.indexOf("x")));
        } else {
            return 1;
        }
    }
    
}