--- a/net/minecraft/world/entity/animal/Ocelot.java
+++ b/net/minecraft/world/entity/animal/Ocelot.java
@@ -127,7 +_,7 @@
 
     @Override
     public boolean removeWhenFarAway(double distanceToClosestPlayer) {
-        return !this.isTrusting() && this.tickCount > 2400;
+        return !this.isTrusting() && this.tickCount > 2400 && !this.hasCustomName() && !this.isLeashed(); // Paper - honor name and leash
     }
 
     public static AttributeSupplier.Builder createAttributes() {
@@ -161,7 +_,7 @@
         if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemInHand) && player.distanceToSqr(this) < 9.0) {
             this.usePlayerItem(player, hand, itemInHand);
             if (!this.level().isClientSide) {
-                if (this.random.nextInt(3) == 0) {
+                if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call and isCancelled check
                     this.setTrusting(true);
                     this.spawnTrustingParticles(true);
                     this.level().broadcastEntityEvent(this, (byte)41);
