SPIGOT-2405: Better event for combust due to fire

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2016-06-15 13:31:35 +10:00
parent b2c01f26da
commit bdf0aef528

View file

@ -204,7 +204,7 @@
- if (this.fireTicks == 0) {
+ // CraftBukkit start - Not on fire yet
+ if (this.fireTicks <= 0) { // Only throw events on the first combust, otherwise it spams
+ EntityCombustEvent event = new EntityCombustEvent(getBukkitEntity(), 8);
+ EntityCombustEvent event = new org.bukkit.event.entity.EntityCombustByBlockEvent(null, getBukkitEntity(), 8);
+ world.getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {