aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-06-23 08:19:22 +1000
committerGitHub <noreply@github.com>2023-06-23 08:19:22 +1000
commit649e7ecd4c601d05d51c1decab91675e77e99ef9 (patch)
tree600a2c6abf4298a602df747591f1064bdbe4029f /src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
parent34e7fe2a360da747750b90c7f11a136e5513d1d8 (diff)
parent46968a541e2231caadd9a9fc471277054bd012cd (diff)
downloadskyhanni-649e7ecd4c601d05d51c1decab91675e77e99ef9.tar.gz
skyhanni-649e7ecd4c601d05d51c1decab91675e77e99ef9.tar.bz2
skyhanni-649e7ecd4c601d05d51c1decab91675e77e99ef9.zip
Merge branch 'hannibal002:beta' into frozen_treasure_tracker
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 07e1c9318..dc98f3a0a 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -134,15 +134,11 @@ object NEUItems {
.withKnownInternalName(internalName)
.resolveToItemStack()?.copy()
- fun getItemStack(internalName: String): ItemStack {
- val stack = getItemStackOrNull(internalName)
- if (stack == null) {
- val error = "ItemResolutionQuery returns null for internalName '$internalName'"
- LorenzUtils.error(error)
- throw RuntimeException(error)
- }
- return stack
- }
+ fun getItemStack(internalName: String): ItemStack = getItemStackOrNull(internalName)
+ ?: throw IllegalStateException(
+ "Could not find the Item '$internalName' in NEU Repo",
+ Error("ItemResolutionQuery returns null for internalName '$internalName'")
+ )
fun isVanillaItem(item: ItemStack) = manager.auctionManager.isVanillaItem(item.getInternalName())