mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 09:26:08 +03:00
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/monster/EntityMob.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntityMob.java
|
|
@@ -1,5 +1,7 @@
|
|
package net.minecraft.entity.monster;
|
|
|
|
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
|
+
|
|
import net.minecraft.enchantment.EnchantmentHelper;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.EntityCreature;
|
|
@@ -118,7 +120,14 @@
|
|
|
|
if (j > 0)
|
|
{
|
|
- entityIn.setFire(j * 4);
|
|
+ // CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
|
|
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entityIn.getBukkitEntity(), j * 4);
|
|
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
|
|
+
|
|
+ if (!combustEvent.isCancelled()) {
|
|
+ entityIn.setFire(combustEvent.getDuration());
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
if (entityIn instanceof EntityPlayer)
|