From f31e5aa4218b77e54f9438adc629c1c2bdd3e291 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sun, 7 Apr 2024 11:01:41 +0200 Subject: Improvement: Allow receiving inquisitor information from all chat (#1316) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index c45bcae0e..df622503a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -356,9 +356,9 @@ object LorenzUtils { * Get the group, otherwise, return null * @param groupName The group name in the pattern */ - fun Matcher.groupOrNull(groupName: String): String? { - return runCatching { this.group(groupName) }.getOrNull() - } + fun Matcher.groupOrNull(groupName: String): String? = runCatching { this.group(groupName) }.getOrNull() + + fun Matcher.hasGroup(groupName: String): Boolean = groupOrNull(groupName) != null fun inAdvancedMiningIsland() = IslandType.DWARVEN_MINES.isInIsland() || IslandType.CRYSTAL_HOLLOWS.isInIsland() || IslandType.MINESHAFT.isInIsland() -- cgit