summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt
index 146a11e3b..aab1db9ad 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/HideArmor.kt
@@ -80,7 +80,8 @@ class HideArmor {
if (slot !in 5..8) continue
val armorSlot = (slot - 5) * -1 + 3
- val armor = getCachedArmor(Minecraft.getMinecraft().thePlayer.entityId)
+ val entityId = Minecraft.getMinecraft()?.thePlayer?.entityId ?: return
+ val armor = getCachedArmor(entityId)
armor[armorSlot] = itemStack
val currentScreen = Minecraft.getMinecraft().currentScreen