aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/loot/LootTracker.java
blob: 791936641a31ae57402bee14b54dc5ac5a4e4908 (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
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 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;

    // 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 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;

    // 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;



        // 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! (Hamster Wheel)")) {
            wolfWheelsDrops++;
            wolfWheelsDropsSession++;
            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! (Toxic Arrow Poison)")) {
            spiderTAPDrops++;
            spiderTAPDropsSession++;
            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! (Foul Flesh)")) {
            zombieFoulFleshDrops++;
            zombieFoulFleshDropsSession++;
            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)")) {
            zombieRNG = true;
            zombieWardenHearts++;
            zombieWardenHeartsSession++;
            ConfigHandler.writeIntConfig("zombie", "heart", zombieWardenHearts);
            if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "WARDEN HEART!", 5);
        }

        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);
        }

        // 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("Bag of Cash")) {
                    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 itemWheels = Utils.getItems("Hamster Wheel");
                    int itemWebs = Utils.getItems("Tarantula Web");
                    int itemTAP = Utils.getItems("Toxic Arrow Poison");
                    int itemRev = Utils.getItems("Revenant Flesh");
                    int itemFoul = Utils.getItems("Foul Flesh");

                    // If no items, are detected, allow check again. Should fix items not being found
                    if (itemTeeth + itemWheels + itemWebs + itemTAP + itemRev + itemFoul > 0) {
                        itemsChecked = System.currentTimeMillis() / 1000;
                        wolfTeeth += itemTeeth;
                        wolfWheels += itemWheels;
                        spiderWebs += itemWebs;
                        spiderTAP += itemTAP;
                        zombieRevFlesh += itemRev;
                        zombieFoulFlesh += itemFoul;
                        wolfTeethSession += itemTeeth;
                        wolfWheelsSession += itemWheels;
                        spiderWebsSession += itemWebs;
                        spiderTAPSession += itemTAP;
                        zombieRevFleshSession += itemRev;
                        zombieFoulFleshSession += itemFoul;

                        ConfigHandler.writeIntConfig("wolf", "teeth", wolfTeeth);
                        ConfigHandler.writeIntConfig("wolf", "wheel", wolfWheels);
                        ConfigHandler.writeIntConfig("spider", "web", spiderWebs);
                        ConfigHandler.writeIntConfig("spider", "tap", spiderTAP);
                        ConfigHandler.writeIntConfig("zombie", "revFlesh", zombieRevFlesh);
                        ConfigHandler.writeIntConfig("zombie", "foulFlesh", zombieFoulFlesh);
                    }
                }
            }
        }
    }
    
    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);
    }
    
}