Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Jan 3, 2025
1 parent 3370ac3 commit 0f8bdce
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,14 @@ object BestiaryData {

@SubscribeEvent
fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) {
if (!isEnabled()) return
if (inInventory) {
for (slot in InventoryUtils.getItemsInOpenChest()) {
val stack = slot.stack
val lore = stack.getLore()
if (lore.any { it == "§7Overall Progress: §b100% §7(§c§lMAX!§7)" || it == "§7Families Completed: §a100%" }) {
slot highlight LorenzColor.GREEN
}
if (!overallProgressEnabled && lore.any { it == "§7Overall Progress: §cHIDDEN" }) {
slot highlight LorenzColor.RED
}
if (!isEnabled() || !inInventory) return
for (slot in InventoryUtils.getItemsInOpenChest()) {
val lore = slot.stack.getLore()
if (lore.any { it == "§7Overall Progress: §b100% §7(§c§lMAX!§7)" || it == "§7Families Completed: §a100%" }) {
slot highlight LorenzColor.GREEN
}
if (!overallProgressEnabled && lore.any { it == "§7Overall Progress: §cHIDDEN" }) {
slot highlight LorenzColor.RED
}
}
}
Expand Down

0 comments on commit 0f8bdce

Please sign in to comment.