mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-22 08:15:05 +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
|
// CraftBukkit start - set off an EntityExplodeEvent for the dragon exploding all these blocks
|
||||||
org.bukkit.entity.Entity bukkitEntity = this.getBukkitEntity();
|
org.bukkit.entity.Entity bukkitEntity = this.getBukkitEntity();
|
||||||
EntityExplodeEvent event = new EntityExplodeEvent(bukkitEntity, bukkitEntity.getLocation(), destroyedBlocks, 0F);
|
EntityExplodeEvent event = new EntityExplodeEvent(bukkitEntity, bukkitEntity.getLocation(), destroyedBlocks, 0F);
|
||||||
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
// this flag literally means 'Dragon hit something hard' (Obsidian, White Stone or Bedrock) and will cause the dragon to slow down.
|
// 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.
|
// We should consider adding an event extension for it, or perhaps returning true if the event is cancelled.
|
||||||
|
|
Loading…
Add table
Reference in a new issue