mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-09 06:50:32 +08:00
Fix calling CombustEvent caused by enchantment
The CombustEvent created when an Entity attacks with a fire enchanted weapon was never raised through the plugin manager. Thanks for pointing it out EdGruberman!
This commit is contained in:
parent
93aed40c4f
commit
67dbe71bd9
@ -844,6 +844,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
if (l > 0) {
|
||||
// CraftBukkit start - raise a combust event when somebody hits with a fire enchanted item
|
||||
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), l*4);
|
||||
Bukkit.getPluginManager().callEvent(combustEvent);
|
||||
|
||||
if (!combustEvent.isCancelled()) {
|
||||
entity.setOnFire(combustEvent.getDuration());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user