diff --git a/gradle.properties b/gradle.properties index 1f09c11..da6b44b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ makeevrserg.java.ktarget=17 # Project makeevrserg.project.name=IaHook makeevrserg.project.group=ru.astrainteractive.iahook -makeevrserg.project.version.string=0.0.8 +makeevrserg.project.version.string=0.0.9 makeevrserg.project.description=ItemsAdder hook for EmpireSMP makeevrserg.project.developers=makeevrserg|Makeev Roman|makeevrserg@gmail.com makeevrserg.project.url=https://empireprojekt.ru diff --git a/plugin/src/main/kotlin/ru/astrainteractive/iahook/util/PassiveManaRestore.kt b/plugin/src/main/kotlin/ru/astrainteractive/iahook/util/PassiveManaRestore.kt index a6b0fd7..6c6af22 100644 --- a/plugin/src/main/kotlin/ru/astrainteractive/iahook/util/PassiveManaRestore.kt +++ b/plugin/src/main/kotlin/ru/astrainteractive/iahook/util/PassiveManaRestore.kt @@ -46,7 +46,12 @@ class PassiveManaRestore( val allContent = listOf( player.inventory.itemInMainHand, player.inventory.itemInOffHand - ) + player.inventory.armorContents.filterNotNull() + ).filter { + !it.type.name.endsWith("_HELMET", true) + && !it.type.name.endsWith("_CHESTPLATE", true) + && !it.type.name.endsWith("_LEGGINGS", true) + && !it.type.name.endsWith("_BOOTS", true) + } + player.inventory.armorContents.filterNotNull() allContent.firstOrNull { val customItem = it.let(CustomStack::byItemStack)