blob: 5cfd59aa1bc3aede84756898757d0da549d28424 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package at.hannibal2.skyhanni.events
import at.hannibal2.skyhanni.data.repo.RepoUtils
import com.google.gson.Gson
import com.google.gson.JsonObject
import java.io.File
class RepositoryReloadEvent(val repoLocation: File, val gson: Gson): LorenzEvent() {
fun getConstant(constant: String) = getConstant<JsonObject>(constant)
inline fun <reified T : Any> getConstant(constant: String) =
RepoUtils.getConstant(repoLocation, constant, gson, T::class.java)
}
|