Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20: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!
Dieser Commit ist enthalten in:
Ursprung
a25151306c
Commit
d75d1660b3
@ -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.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren