diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-07 23:37:18 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-07 23:37:18 +0200 |
commit | 02ac961b3f1a371302963559e875698de8eb7a1d (patch) | |
tree | 6432f510a74cc9381610466442ca023de6498a8a /src/main/java/at/hannibal2/skyhanni/data/model | |
parent | 8b2bc18775d69d4ab854eed7e3e10e36085043fd (diff) | |
download | skyhanni-02ac961b3f1a371302963559e875698de8eb7a1d.tar.gz skyhanni-02ac961b3f1a371302963559e875698de8eb7a1d.tar.bz2 skyhanni-02ac961b3f1a371302963559e875698de8eb7a1d.zip |
replace enum.getEntries() to enum.entries and using .addSelector<Enum>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/model')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt b/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt index cc0a82a2d..f9f33d6cf 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt @@ -9,10 +9,10 @@ enum class ComposterUpgrade(val displayName: String, val slotNumber: Int) { ; companion object { - private fun regexValues() = values().joinToString("|") { it.displayName } + private fun regexValues() = entries.joinToString("|") { it.displayName } val regex = "§a(?<name>${regexValues()})(?: (?<level>.*))?".toPattern() - fun getByName(name: String) = values().firstOrNull { it.displayName == name } + fun getByName(name: String) = entries.firstOrNull { it.displayName == name } } }
\ No newline at end of file |