aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-30 22:49:06 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-30 22:49:06 +0100
commit90da8983eaa77e44c32b9841212741404ab98b98 (patch)
tree5ee2e9e5b61ae98558c891a10df5995cccb4ceec /src/main/java/at/hannibal2
parent27aeb89179f77ed82a5275a833183cdc6d945a23 (diff)
downloadskyhanni-90da8983eaa77e44c32b9841212741404ab98b98.tar.gz
skyhanni-90da8983eaa77e44c32b9841212741404ab98b98.tar.bz2
skyhanni-90da8983eaa77e44c32b9841212741404ab98b98.zip
improved readability
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt10
1 files changed, 5 insertions, 5 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 2a9e4d349..d3b75780c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt
@@ -70,15 +70,15 @@ object UniqueGiftingOpportunitiesFeatures {
if (!isEnabled()) return
val entity = event.entity
if (entity is EntityPlayerSP) return
- if (entity is EntityPlayer && !entity.isNPC() && excludeIronman(entity) && excludeBingo(entity) && !hasGiftedPlayer(entity))
+ if (entity is EntityPlayer && !entity.isNPC() && !isIronman(entity) && !isBingo(entity) && !hasGiftedPlayer(entity))
event.color = LorenzColor.DARK_GREEN.toColor().withAlpha(127)
}
- private fun excludeBingo(entity: EntityLivingBase) =
- HypixelData.bingo || !entity.displayName.formattedText.endsWith("Ⓑ§r")
+ private fun isBingo(entity: EntityLivingBase) =
+ !HypixelData.bingo && entity.displayName.formattedText.endsWith("Ⓑ§r")
- private fun excludeIronman(entity: EntityLivingBase) =
- HypixelData.bingo || HypixelData.ironman || !entity.displayName.formattedText.endsWith("♲§r")
+ private fun isIronman(entity: EntityLivingBase) =
+ !LorenzUtils.noTradeMode && entity.displayName.formattedText.endsWith("♲§r")
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {