--- a/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
+++ b/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
@@ -82,7 +_,7 @@
             boolean flag = false;
 
             for (Leashable leashable : Leashable.leashableLeashedTo(player)) {
-                if (leashable.canHaveALeashAttachedTo(this)) {
+                if (leashable.canHaveALeashAttachedTo(this) && org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerLeashEntityEvent(leashable, this, player, hand)) { // Paper - leash event
                     leashable.setLeashedTo(this, true);
                     flag = true;
                 }
@@ -91,7 +_,7 @@
             boolean flag1 = false;
             if (!flag && !player.isSecondaryUseActive()) {
                 for (Leashable leashable1 : Leashable.leashableLeashedTo(this)) {
-                    if (leashable1.canHaveALeashAttachedTo(player)) {
+                    if (leashable1.canHaveALeashAttachedTo(player) && org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerLeashEntityEvent(leashable1, player, player, hand)) { // Paper - leash event
                         leashable1.setLeashedTo(player, true);
                         flag1 = true;
                     }
@@ -111,7 +_,7 @@
     @Override
     public void notifyLeasheeRemoved(Leashable leashHolder) {
         if (Leashable.leashableLeashedTo(this).isEmpty()) {
-            this.discard();
+            this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
         }
     }
 
@@ -120,7 +_,12 @@
         return this.level().getBlockState(this.pos).is(BlockTags.FENCES);
     }
 
+    // Paper start - Track if a knot was created
     public static LeashFenceKnotEntity getOrCreateKnot(Level level, BlockPos pos) {
+        return getOrCreateKnot(level, pos, null);
+    }
+    public static LeashFenceKnotEntity getOrCreateKnot(Level level, BlockPos pos, @Nullable org.apache.commons.lang3.mutable.MutableBoolean created) {
+        // Paper end - Track if a knot was created
         int x = pos.getX();
         int y = pos.getY();
         int z = pos.getZ();
@@ -134,7 +_,7 @@
         }
 
         LeashFenceKnotEntity leashFenceKnotEntity1 = new LeashFenceKnotEntity(level, pos);
-        level.addFreshEntity(leashFenceKnotEntity1);
+        if (level.addFreshEntity(leashFenceKnotEntity1) && created != null) { created.setTrue(); } // Paper - Track if a knot was created
         return leashFenceKnotEntity1;
     }
 
