diff --git a/src/main/kotlin/nl/sugcube/dirtyarrows/bow/ability/DisarmingBow.kt b/src/main/kotlin/nl/sugcube/dirtyarrows/bow/ability/DisarmingBow.kt index df5ee27..774cadb 100644 --- a/src/main/kotlin/nl/sugcube/dirtyarrows/bow/ability/DisarmingBow.kt +++ b/src/main/kotlin/nl/sugcube/dirtyarrows/bow/ability/DisarmingBow.kt @@ -46,7 +46,7 @@ open class DisarmingBow(plugin: DirtyArrows) : BowAbility( // Chance to drop armour. val newArmour = target.equipment.armorContents.map { item -> - if (item.type != Material.AIR && Random.nextDouble() <= dropArmourChance) { + if (item != null && item.type != Material.AIR && Random.nextDouble() <= dropArmourChance) { target.world.dropItem(target.location, item) item.type = Material.AIR }