Only helmets take damage from acid rain

https://github.com/BentoBoxWorld/AcidIsland/issues/58
This commit is contained in:
tastybento 2019-08-30 21:12:44 -07:00
parent e7c6a751c0
commit a3f72f5f1d
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.6.0</build.version>
<build.version>1.7.0</build.version>
</properties>
<!-- Profiles will allow to automatically change build version. -->

View File

@ -249,8 +249,8 @@ public class AcidEffect implements Listener {
// Check respiration (Bukkit name OXYGEN) enchantment
// Each level gives the same protection as a diamond helmet
red += helmet.getEnchantments().getOrDefault(Enchantment.OXYGEN, 0) * 0.12;
// Damage
if (damage(helmet)) {
// Damage if helmet
if (helmet.getType().name().contains("HELMET") && damage(helmet)) {
player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1F, 1F);
inv.setHelmet(null);
}