aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt9
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