--- a/net/minecraft/server/commands/SummonCommand.java
+++ b/net/minecraft/server/commands/SummonCommand.java
@@ -80,7 +_,7 @@
         BlockPos blockPos = BlockPos.containing(pos);
         if (!Level.isInSpawnableBounds(blockPos)) {
             throw INVALID_POSITION.create();
-        } else if (source.getLevel().getDifficulty() == Difficulty.PEACEFUL && !type.value().isAllowedInPeaceful()) {
+        } else if (source.getLevel().getDifficulty() == Difficulty.PEACEFUL && !type.value().isAllowedInPeaceful(tag)) { // Paper - check peaceful override
             throw ERROR_FAILED_PEACEFUL.create();
         } else {
             CompoundTag compoundTag = tag.copy();
@@ -88,6 +_,7 @@
             ServerLevel level = source.getLevel();
             Entity entity = EntityType.loadEntityRecursive(compoundTag, level, EntitySpawnReason.COMMAND, entity1 -> {
                 entity1.snapTo(pos.x, pos.y, pos.z, entity1.getYRot(), entity1.getXRot());
+                entity1.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND; // Paper - Entity#getEntitySpawnReason
                 return entity1;
             });
             if (entity == null) {
@@ -97,7 +_,7 @@
                     mob.finalizeSpawn(source.getLevel(), source.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, null);
                 }
 
-                if (!level.tryAddFreshEntityWithPassengers(entity)) {
+                if (!level.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
                     throw ERROR_DUPLICATE_UUID.create();
                 } else {
                     return entity;
