From e9a5a461992c3a8d1dc80803b770bbcd7a0993ca Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 23 Aug 2023 00:33:04 +0200 Subject: Code cleanup --- src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/main/java') 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() 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 -- cgit