Actually use extended/ambient in BeaconEffectEvent (#5647)

This commit is contained in:
Jake Potrebic 2021-05-18 01:43:46 -07:00
parent 17f3b919ea
commit 92f3f280d4

View file

@ -47,8 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - BeaconEffectEvent
+ BeaconEffectEvent event = new BeaconEffectEvent(block, effect, (Player) entityhuman.getBukkitEntity(), isPrimary);
+ if (CraftEventFactory.callEvent(event).isCancelled()) continue;
+ PotionEffect eventEffect = event.getEffect();
+ entityhuman.addEffect(new MobEffect(MobEffectList.fromId(eventEffect.getType().getId()), eventEffect.getDuration(), eventEffect.getAmplifier(), true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
+ entityhuman.addEffect(new MobEffect(CraftPotionUtil.fromBukkit(event.getEffect())), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
+ // Paper end
}
}