Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 13:30:05 +01:00
Made flaming arrows fire EntityCombustByEntity events. Fixes BUKKIT-707
Dieser Commit ist enthalten in:
Ursprung
4d563342ba
Commit
274e8a141a
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||||
@ -188,7 +189,14 @@ public class EntityArrow extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isBurning()) {
|
if (this.isBurning()) {
|
||||||
movingobjectposition.entity.setOnFire(5);
|
// CraftBukkit start
|
||||||
|
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
||||||
|
Bukkit.getPluginManager().callEvent(combustEvent);
|
||||||
|
|
||||||
|
if (!combustEvent.isCancelled()) {
|
||||||
|
movingobjectposition.entity.setOnFire(combustEvent.getDuration());
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren