aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-07-01 08:47:24 +1000
committerGitHub <noreply@github.com>2023-07-01 00:47:24 +0200
commitdb0f40aabed9a29e0055c3c9e6a6b1159b1444bf (patch)
tree67c682fa39bfa845ac1875d860531c7bddc389df /src/main/java/at/hannibal2/skyhanni/config
parent8667307b1367e3047c854b3a1ed5d1a7c1e879e6 (diff)
downloadskyhanni-db0f40aabed9a29e0055c3c9e6a6b1159b1444bf.tar.gz
skyhanni-db0f40aabed9a29e0055c3c9e6a6b1159b1444bf.tar.bz2
skyhanni-db0f40aabed9a29e0055c3c9e6a6b1159b1444bf.zip
No more getItemStack() crashes hopefully (#276)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Storage.java3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt13
2 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
index a1f9fbfb1..d720b0211 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
@@ -35,6 +35,9 @@ public class Storage {
@Expose
public long nextCityProjectParticipationTime = 0L;
+
+ @Expose
+ public String lastRepoIssueVersion = "";
}
public static class ProfileSpecific {
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 59b850784..b91bf4252 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigGuiManager
import at.hannibal2.skyhanni.config.commands.SimpleCommand.ProcessCommandRunnable
import at.hannibal2.skyhanni.data.ApiDataLoader
import at.hannibal2.skyhanni.data.GuiEditManager
+import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay
import at.hannibal2.skyhanni.features.bingo.BingoNextStepHelper
import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper
@@ -86,6 +87,7 @@ object Commands {
registerCommand("shtestcomposter") { ComposterOverlay.onCommand(it) }
registerCommand("shtestinquisitor") { InquisitorWaypointShare.test() }
registerCommand("shshowcropmoneycalculation") { CropMoneyDisplay.toggleShowCalculation() }
+ registerCommand("shstoprepowarnings") { stopRepoWarnings()}
// for developers - coding help
registerCommand("shreloadlocalrepo") { SkyHanniMod.repo.reloadLocalRepo() }
@@ -113,6 +115,17 @@ object Commands {
}
}
+ private fun stopRepoWarnings() {
+ val hidden = ProfileStorageData.playerSpecific?.lastRepoIssueVersion
+ if (hidden == SkyHanniMod.version) {
+ ProfileStorageData.playerSpecific?.lastRepoIssueVersion = ""
+ LorenzUtils.chat("§e[SkyHanni] Re-enabled repo warnings.")
+ } else {
+ ProfileStorageData.playerSpecific?.lastRepoIssueVersion = SkyHanniMod.version
+ LorenzUtils.chat("§e[SkyHanni] Disabled repo warnings until next update.")
+ }
+ }
+
private fun clearFarmingItems() {
val config = GardenAPI.config?.fortune ?: return
LorenzUtils.chat("§e[SkyHanni] clearing farming items")