SPIGOT-840, SPIGOT-2522: [Draft] Add EntityPotionEffectChangeEvent
Discussion ongoing in PR #449 By: kaenganxt <kaenganxt@mc-anura.de>
This commit is contained in:
@@ -51,6 +51,15 @@
|
||||
public EntityHuman(World world, GameProfile gameprofile) {
|
||||
super(EntityTypes.PLAYER, world);
|
||||
this.cd = ItemStack.a;
|
||||
@@ -184,7 +208,7 @@
|
||||
ItemStack itemstack = this.getEquipment(EnumItemSlot.HEAD);
|
||||
|
||||
if (itemstack.getItem() == Items.TURTLE_HELMET && !this.a(TagsFluid.a)) {
|
||||
- this.addEffect(new MobEffect(MobEffects.WATER_BREATHING, 200, 0, false, false, true));
|
||||
+ this.addEffect(new MobEffect(MobEffects.WATER_BREATHING, 200, 0, false, false, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.TURTLE_HELMET); // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
@@ -369,7 +393,8 @@
|
||||
|
||||
if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.world.getGameRules().getBoolean("naturalRegeneration")) {
|
||||
|
||||
Reference in New Issue
Block a user