--- a/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
+++ b/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
@@ -18,6 +_,7 @@
 
 public class SkeletonTrapGoal extends Goal {
     private final SkeletonHorse horse;
+    private java.util.List<org.bukkit.entity.HumanEntity> eligiblePlayers; // Paper
 
     public SkeletonTrapGoal(SkeletonHorse horse) {
         this.horse = horse;
@@ -25,12 +_,13 @@
 
     @Override
     public boolean canUse() {
-        return this.horse.level().hasNearbyAlivePlayer(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0);
+        return !(this.eligiblePlayers = this.horse.level().findNearbyBukkitPlayers(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0, net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING)).isEmpty(); // Paper - Affects Spawning API & SkeletonHorseTrapEvent
     }
 
     @Override
     public void tick() {
         ServerLevel serverLevel = (ServerLevel)this.horse.level();
+        if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.horse.getBukkitEntity(), this.eligiblePlayers).callEvent()) return; // Paper
         DifficultyInstance currentDifficultyAt = serverLevel.getCurrentDifficultyAt(this.horse.blockPosition());
         this.horse.setTrap(false);
         this.horse.setTamed(true);
@@ -39,11 +_,11 @@
         if (lightningBolt != null) {
             lightningBolt.moveTo(this.horse.getX(), this.horse.getY(), this.horse.getZ());
             lightningBolt.setVisualOnly(true);
-            serverLevel.addFreshEntity(lightningBolt);
+            serverLevel.strikeLightning(lightningBolt, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRAP); // CraftBukkit
             Skeleton skeleton = this.createSkeleton(currentDifficultyAt, this.horse);
             if (skeleton != null) {
                 skeleton.startRiding(this.horse);
-                serverLevel.addFreshEntityWithPassengers(skeleton);
+                serverLevel.addFreshEntityWithPassengers(skeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRAP); // CraftBukkit
 
                 for (int i = 0; i < 3; i++) {
                     AbstractHorse abstractHorse = this.createHorse(currentDifficultyAt);
@@ -52,7 +_,7 @@
                         if (skeleton1 != null) {
                             skeleton1.startRiding(abstractHorse);
                             abstractHorse.push(this.horse.getRandom().triangle(0.0, 1.1485), 0.0, this.horse.getRandom().triangle(0.0, 1.1485));
-                            serverLevel.addFreshEntityWithPassengers(abstractHorse);
+                            serverLevel.addFreshEntityWithPassengers(abstractHorse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY); // CraftBukkit
                         }
                     }
                 }
