diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-05 12:07:44 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-05 12:07:44 +0100 |
| commit | 03ce43d928d18328e0cd731f161a7bfd794af3d3 (patch) | |
| tree | 43d15879072646aadb03e212bb21fea60b3eeb59 /src/main/java/at/hannibal2/skyhanni/features/misc | |
| parent | 95029eebcc73feac8842e953239cb71a0c1d1b48 (diff) | |
| download | skyhanni-03ce43d928d18328e0cd731f161a7bfd794af3d3.tar.gz skyhanni-03ce43d928d18328e0cd731f161a7bfd794af3d3.tar.bz2 skyhanni-03ce43d928d18328e0cd731f161a7bfd794af3d3.zip | |
Moving pet menu check into PetAPI
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt index d4cc01fbd..ebff243f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -18,7 +18,6 @@ class CurrentPetDisplay { private val config get() = SkyHanniMod.feature.misc.pets // TODO USE SH-REPO - private val inventoryNamePattern = "Pets( \\(\\d+/\\d+\\) )?".toPattern() private val inventorySelectedPetPattern = "§7§7Selected pet: (?<pet>.*)".toPattern() private val chatSpawnPattern = "§aYou summoned your §r(?<pet>.*)§r§a!".toPattern() private val chatDespawnPattern = "§aYou despawned your §r.*§r§a!".toPattern() @@ -50,7 +49,7 @@ class CurrentPetDisplay { @SubscribeEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { - if (!inventoryNamePattern.matches(event.inventoryName)) return + if (!PetAPI.isPetMenu(event.inventoryName)) return val lore = event.inventoryItems[4]?.getLore() ?: return for (line in lore) { |
