diff options
author | Brandon <brandon.wamboldt@gmail.com> | 2023-10-15 10:33:55 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-15 15:33:55 +0200 |
commit | 29904921c5d2c81b8d7cb37dcd57af9fd0761343 (patch) | |
tree | 27071d1df08073a2356454e6992321cd534dc591 /src/main/java/at/hannibal2/skyhanni/events | |
parent | 9755df0878023c73ac18ffc7aa07706b6c0a77c0 (diff) | |
download | skyhanni-29904921c5d2c81b8d7cb37dcd57af9fd0761343.tar.gz skyhanni-29904921c5d2c81b8d7cb37dcd57af9fd0761343.tar.bz2 skyhanni-29904921c5d2c81b8d7cb37dcd57af9fd0761343.zip |
Feature: Show alerts when the player catches a legendary sea creature (#530)
dded Alerts when the player catches a legendary sea creature. #530
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt index 18ff50b0a..8010564a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt @@ -5,12 +5,13 @@ import at.hannibal2.skyhanni.test.command.ErrorManager import com.google.gson.Gson import com.google.gson.JsonObject import java.io.File +import java.lang.reflect.Type class RepositoryReloadEvent(val repoLocation: File, val gson: Gson) : LorenzEvent() { fun getConstant(constant: String) = getConstant<JsonObject>(constant) - inline fun <reified T : Any> getConstant(constant: String) = try { - RepoUtils.getConstant(repoLocation, constant, gson, T::class.java) + inline fun <reified T : Any> getConstant(constant: String, type: Type? = null) = try { + RepoUtils.getConstant(repoLocation, constant, gson, T::class.java, type) } catch (e: Exception) { ErrorManager.logError( Exception("Repo parsing error while trying to read constant '$constant'", e), |