diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 19:56:36 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 19:56:36 +0100 |
commit | 9e16ac756bbeadad01eb247ae4c220bf1f4001f4 (patch) | |
tree | b04ea874ea7bf87a3d9e70dbb3b3a0b0a7f3539a /src/main | |
parent | 82e11b2bffbd9dd998edfd417aca1b1c4a2094b4 (diff) | |
download | skyhanni-9e16ac756bbeadad01eb247ae4c220bf1f4001f4.tar.gz skyhanni-9e16ac756bbeadad01eb247ae4c220bf1f4001f4.tar.bz2 skyhanni-9e16ac756bbeadad01eb247ae4c220bf1f4001f4.zip |
Code cleanup
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt | 9 |
1 files changed, 5 insertions, 4 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 f2882be33..64e171602 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class CurrentPetDisplay { + private val config get() = SkyHanniMod.feature.hidden @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { @@ -19,15 +20,15 @@ class CurrentPetDisplay { val message = event.message if (message.matchRegex("§aYou summoned your §r(.*)§r§a!")) { - SkyHanniMod.feature.hidden.currentPet = message.between("your §r", "§r§a") + config.currentPet = message.between("your §r", "§r§a") blocked = true } if (message.matchRegex("§cAutopet §eequipped your §7(.*)§e! §a§lVIEW RULE")) { - SkyHanniMod.feature.hidden.currentPet = message.between("] ", "§e!") + config.currentPet = message.between("] ", "§e!") blocked = true } if (message.matchRegex("§aYou despawned your §r(.*)§r§a!")) { - SkyHanniMod.feature.hidden.currentPet = "" + config.currentPet = "" blocked = true } @@ -42,6 +43,6 @@ class CurrentPetDisplay { if (!SkyHanniMod.feature.misc.petDisplay) return - SkyHanniMod.feature.misc.petDisplayPos.renderString(SkyHanniMod.feature.hidden.currentPet) + SkyHanniMod.feature.misc.petDisplayPos.renderString(config.currentPet) } }
\ No newline at end of file |