diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-23 00:33:04 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-23 00:33:04 +0200 |
commit | e9a5a461992c3a8d1dc80803b770bbcd7a0993ca (patch) | |
tree | 9b9bb42a5a2a581de99c4a1e3cc5dfbc43d8fdfe /src/main/java | |
parent | bd7c0eb2cdf4825ce4fa40482de9693d24e27a70 (diff) | |
download | skyhanni-e9a5a461992c3a8d1dc80803b770bbcd7a0993ca.tar.gz skyhanni-e9a5a461992c3a8d1dc80803b770bbcd7a0993ca.tar.bz2 skyhanni-e9a5a461992c3a8d1dc80803b770bbcd7a0993ca.zip |
Code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt index 92f7bebb3..0681b8632 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt @@ -21,12 +21,9 @@ class MayorElection { var candidates = mapOf<Int, MayorJson.Candidate>() var currentCandidate: MayorJson.Candidate? = null - fun isPerkActive(mayor: String, perk: String): Boolean { - return currentCandidate?.let { currentCandidate -> - currentCandidate.name == mayor && currentCandidate.perks.any { it.name == perk } - } ?: false - } - + fun isPerkActive(mayor: String, perk: String) = currentCandidate?.let { currentCandidate -> + currentCandidate.name == mayor && currentCandidate.perks.any { it.name == perk } + } ?: false } @SubscribeEvent |