aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
diff options
context:
space:
mode:
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())