13
0
geforkt von Mirrors/Paper

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!
Dieser Commit ist enthalten in:
Andrew Ardill 2012-01-09 10:46:07 +11:00
Ursprung 93aed40c4f
Commit 67dbe71bd9

Datei anzeigen

@ -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());
}