--- a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
+++ b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
@@ -19,6 +_,13 @@
     }
 
     public static void createEndPlatform(ServerLevelAccessor level, BlockPos pos, boolean dropBlocks) {
+        // CraftBukkit start
+        createEndPlatform(level, pos, dropBlocks, null);
+    }
+
+    public static void createEndPlatform(ServerLevelAccessor level, BlockPos pos, boolean dropBlocks, @javax.annotation.Nullable net.minecraft.world.entity.Entity entity) {
+        org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(level);
+        // CraftBukkit end
         BlockPos.MutableBlockPos mutableBlockPos = pos.mutable();
 
         for (int i = -2; i <= 2; i++) {
@@ -26,15 +_,31 @@
                 for (int i2 = -1; i2 < 3; i2++) {
                     BlockPos blockPos = mutableBlockPos.set(pos).move(i1, i2, i);
                     Block block = i2 == -1 ? Blocks.OBSIDIAN : Blocks.AIR;
-                    if (!level.getBlockState(blockPos).is(block)) {
+                    if (!blockList.getBlockState(blockPos).is(block)) { // CraftBukkit
                         if (dropBlocks) {
-                            level.destroyBlock(blockPos, true, null);
+                            blockList.destroyBlock(blockPos, true, null); // CraftBukkit
                         }
 
-                        level.setBlock(blockPos, block.defaultBlockState(), 3);
+                        blockList.setBlock(blockPos, block.defaultBlockState(), 3); // CraftBukkit
                     }
                 }
             }
         }
+
+        // CraftBukkit start
+        // SPIGOT-7746: Entity will only be null during world generation, which is async, so just generate without event
+        if (entity != null) {
+            org.bukkit.World bworld = level.getLevel().getWorld();
+            org.bukkit.event.world.PortalCreateEvent portalEvent = new org.bukkit.event.world.PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blockList.getSnapshotBlocks(), bworld, entity.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.END_PLATFORM);
+            level.getLevel().getCraftServer().getPluginManager().callEvent(portalEvent);
+            if (portalEvent.isCancelled()) return;
+        }
+
+        if (dropBlocks) {
+            blockList.placeBlocks(state -> level.destroyBlock(state.getPosition(), true, null));
+        } else {
+            blockList.placeBlocks();
+        }
+        // CraftBukkit end
     }
 }
