mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
SPIGOT-4882: EntityExplodeEvent appears to fire every tick because of enderdragon
This commit is contained in:
parent
524facd24e
commit
d20328368c
@ -70,11 +70,16 @@
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
@@ -407,6 +428,43 @@
|
||||
@@ -407,6 +428,48 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - Set off an EntityExplodeEvent for the dragon exploding all these blocks
|
||||
+ // SPIGOT-4882: don't fire event if nothing hit
|
||||
+ if (!flag1) {
|
||||
+ return flag;
|
||||
+ }
|
||||
+
|
||||
+ org.bukkit.entity.Entity bukkitEntity = this.getBukkitEntity();
|
||||
+ EntityExplodeEvent event = new EntityExplodeEvent(bukkitEntity, bukkitEntity.getLocation(), destroyedBlocks, 0F);
|
||||
+ bukkitEntity.getServer().getPluginManager().callEvent(event);
|
||||
|
Loading…
Reference in New Issue
Block a user