mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
Make EntityEnderDragon call the ExplosionEventi
Rather than just creating the event and not worrying any further about it. Thanks for the heads up snowleo!
This commit is contained in:
parent
a25151306c
commit
d75d1660b3
1 changed files with 1 additions and 0 deletions
|
@ -489,6 +489,7 @@ public class EntityEnderDragon extends EntityComplex {
|
|||
// CraftBukkit start - set off an EntityExplodeEvent for the dragon exploding all these blocks
|
||||
org.bukkit.entity.Entity bukkitEntity = this.getBukkitEntity();
|
||||
EntityExplodeEvent event = new EntityExplodeEvent(bukkitEntity, bukkitEntity.getLocation(), destroyedBlocks, 0F);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
// this flag literally means 'Dragon hit something hard' (Obsidian, White Stone or Bedrock) and will cause the dragon to slow down.
|
||||
// We should consider adding an event extension for it, or perhaps returning true if the event is cancelled.
|
||||
|
|
Loading…
Reference in a new issue