mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-12-23 09:37:43 +01:00
Only helmets take damage from acid rain
https://github.com/BentoBoxWorld/AcidIsland/issues/58
This commit is contained in:
parent
e7c6a751c0
commit
a3f72f5f1d
2
pom.xml
2
pom.xml
@ -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. -->
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user