Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01: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!
Dieser Commit ist enthalten in:
Ursprung
93aed40c4f
Commit
67dbe71bd9
@ -844,6 +844,8 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
if (l > 0) {
|
if (l > 0) {
|
||||||
// CraftBukkit start - raise a combust event when somebody hits with a fire enchanted item
|
// CraftBukkit start - raise a combust event when somebody hits with a fire enchanted item
|
||||||
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), l*4);
|
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), l*4);
|
||||||
|
Bukkit.getPluginManager().callEvent(combustEvent);
|
||||||
|
|
||||||
if (!combustEvent.isCancelled()) {
|
if (!combustEvent.isCancelled()) {
|
||||||
entity.setOnFire(combustEvent.getDuration());
|
entity.setOnFire(combustEvent.getDuration());
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren