diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt | 10 |
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) { |