--- a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
+++ b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
@@ -19,6 +_,12 @@
     }
 
     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, 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 +_,33 @@
                 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)) {
+                    // CraftBukkit start
+                    if (!blockList.getBlockState(blockPos).is(block)) {
                         if (dropBlocks) {
-                            level.destroyBlock(blockPos, true, null);
+                            blockList.destroyBlock(blockPos, true, null);
                         }
 
-                        level.setBlock(blockPos, block.defaultBlockState(), 3);
+                        blockList.setBlock(blockPos, block.defaultBlockState(), 3);
+                        // CraftBukkit end
                     }
                 }
             }
         }
+
+        // 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.getList(), bworld, entity.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.END_PLATFORM);
+            level.getLevel().getCraftServer().getPluginManager().callEvent(portalEvent);
+            if (portalEvent.isCancelled()) return;
+        }
+
+        // SPIGOT-7856: End platform not dropping items after replacing blocks
+        if (dropBlocks) {
+            blockList.getList().forEach((state) -> level.destroyBlock(state.getPosition(), true, null));
+        }
+        blockList.updateList();
+        // CraftBukkit end
     }
 }
