mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 17:31:06 +01:00
SPIGOT-4882: EntityExplodeEvent appears to fire every tick because of enderdragon
This commit is contained in:
parent
524facd24e
commit
d20328368c
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue