diff options
author | Fluboxer <36457056+Fluboxer@users.noreply.github.com> | 2024-04-17 02:49:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-17 02:49:17 +0300 |
commit | 82dc828a83b6efaf9d14a0bf713b7776faa01dcc (patch) | |
tree | 1705cd534db18f27916d8b609e0446a43d29301e /src/main | |
parent | 732ab7e8ef193ce108f2c64206a0b0a4e111f132 (diff) | |
download | Skyblocker-82dc828a83b6efaf9d14a0bf713b7776faa01dcc.tar.gz Skyblocker-82dc828a83b6efaf9d14a0bf713b7776faa01dcc.tar.bz2 Skyblocker-82dc828a83b6efaf9d14a0bf713b7776faa01dcc.zip |
store crypts in int instead of calling it twice
untested, made in github's editor. Proceed with caution
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonScore.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonScore.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonScore.java index c27e68d5..9c81aa07 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonScore.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonScore.java @@ -68,6 +68,7 @@ public class DungeonScore { private static int puzzleCount; private static int deathCount; private static int score; + private static int crypts; private static final Map<String, Boolean> SpiritPetCache = new HashMap<>(); public static void init() { @@ -114,9 +115,10 @@ public class DungeonScore { sent270 = true; } - if (!sentCrypts && score >= SCORE_CONFIG.dungeonCryptsMessageThreshold && getCrypts() < 5) { + crypts = getCrypts() + if (!sentCrypts && score >= SCORE_CONFIG.dungeonCryptsMessageThreshold && crypts < 5) { if (SCORE_CONFIG.enableDungeonCryptsMessage) { - MessageScheduler.INSTANCE.sendMessageAfterCooldown("/pc " + Constants.PREFIX.get().getString() + SCORE_CONFIG.dungeonCryptsMessage.replaceAll("\\[crypts]", String.valueOf(getCrypts()))); + MessageScheduler.INSTANCE.sendMessageAfterCooldown("/pc " + Constants.PREFIX.get().getString() + SCORE_CONFIG.dungeonCryptsMessage.replaceAll("\\[crypts]", String.valueOf(crypts))); } sentCrypts = true; } |