aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 98a97af..ad5106f 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -3062,22 +3062,22 @@ public class DankersSkyblockMod
if(slotIndex % 9 != 0 && slotIndex != 53) {
ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1);
- if(itemStack.getItemDamage() == 5) isValid = true;
+ if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true;
}
if(!isValid && slotIndex % 9 != 8 && slotIndex != 0) {
ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1);
- if(itemStack.getItemDamage() == 5) isValid = true;
+ if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true;
}
if(!isValid && slotIndex <= 44) {
ItemStack itemStack = inventory.getStackInSlot(slotIndex + 9);
- if(itemStack.getItemDamage() == 5) isValid = true;
+ if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true;
}
if(!isValid && slotIndex >= 9) {
ItemStack itemStack = inventory.getStackInSlot(slotIndex - 9);
- if(itemStack.getItemDamage() == 5) isValid = true;
+ if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true;
}
shouldCancel = !isValid;