--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
+++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
@@ -4,6 +4,11 @@
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
+// CraftBukkit start
+import org.bukkit.craftbukkit.entity.CraftEnderDragon;
+import org.bukkit.event.entity.EnderDragonChangePhaseEvent;
+// CraftBukkit end
+
 public class DragonControllerManager {
 
     private static final Logger LOGGER = LogManager.getLogger();
@@ -22,6 +27,19 @@
                 this.currentPhase.e();
             }
 
+            // CraftBukkit start - Call EnderDragonChangePhaseEvent
+            EnderDragonChangePhaseEvent event = new EnderDragonChangePhaseEvent(
+                    (CraftEnderDragon) this.dragon.getBukkitEntity(),
+                    (this.currentPhase == null) ? null : CraftEnderDragon.getBukkitPhase(this.currentPhase.getControllerPhase()),
+                    CraftEnderDragon.getBukkitPhase(dragoncontrollerphase)
+            );
+            this.dragon.level.getCraftServer().getPluginManager().callEvent(event);
+            if (event.isCancelled()) {
+                return;
+            }
+            dragoncontrollerphase = CraftEnderDragon.getMinecraftPhase(event.getNewPhase());
+            // CraftBukkit end
+
             this.currentPhase = this.b(dragoncontrollerphase);
             if (!this.dragon.level.isClientSide) {
                 this.dragon.getDataWatcher().set(EntityEnderDragon.DATA_PHASE, dragoncontrollerphase.b());
@@ -43,6 +61,6 @@
             this.phases[i] = dragoncontrollerphase.a(this.dragon);
         }
 
-        return this.phases[i];
+        return (T) this.phases[i]; // CraftBukkit - decompile error
     }
 }
