diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-09-29 19:41:58 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-29 11:41:58 +0200 |
commit | 8988f7d34d706b909012dceea8bad65b4863ea44 (patch) | |
tree | be907ec20f3cfbd46f0ea314d615a47596e177ba /src/main/java/at/hannibal2/skyhanni/features/event | |
parent | 3569dec0ab32c357eb34cff79c200f379f3d19ce (diff) | |
download | skyhanni-8988f7d34d706b909012dceea8bad65b4863ea44.tar.gz skyhanni-8988f7d34d706b909012dceea8bad65b4863ea44.tar.bz2 skyhanni-8988f7d34d706b909012dceea8bad65b4863ea44.zip |
Backend: Detekt Fixes Part 4 (#2610)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/event')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/MythicRabbitPetWarning.kt | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt index e24a66594..b1939a793 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt @@ -57,12 +57,12 @@ object UniqueGiftingOpportunitiesFeatures { private fun isEnabled() = holdingGift - private val hasNotGiftedNametag = "§a§lꤥ" - private val hasGiftedNametag = "§c§lꤥ" + private const val HAS_NOT_GIFTED_NAMETAG = "§a§lꤥ" + private const val HAS_GIFTED_NAMETAG = "§c§lꤥ" private fun analyzeArmorStand(entity: EntityArmorStand) { if (!config.useArmorStandDetection) return - if (entity.name != hasGiftedNametag) return + if (entity.name != HAS_GIFTED_NAMETAG) return val matchedPlayer = EntityUtils.getEntitiesNearby<EntityPlayer>(entity.getLorenzVec(), 2.0) .singleOrNull { !it.isNPC() } ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/MythicRabbitPetWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/MythicRabbitPetWarning.kt index 8162f3a05..833583ad0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/MythicRabbitPetWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/MythicRabbitPetWarning.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark import kotlin.time.Duration.Companion.seconds object MythicRabbitPetWarning { - val mythicRabbit = "§dRabbit" - var lastCheck = SimpleTimeMark.farPast() + private const val MYTHIC_RABBIT_DISPLAY_NAME = "§dRabbit" + private var lastCheck = SimpleTimeMark.farPast() fun check() { if (!HoppityEggsManager.config.petWarning) return @@ -21,7 +21,7 @@ object MythicRabbitPetWarning { } } - fun correctPet() = PetAPI.isCurrentPet(mythicRabbit) + fun correctPet() = PetAPI.isCurrentPet(MYTHIC_RABBIT_DISPLAY_NAME) private fun warn() { ChatUtils.chat("Use a §dMythic Rabbit Pet §efor more chocolate!") |