--- a/net/minecraft/world/entity/animal/Ocelot.java
+++ b/net/minecraft/world/entity/animal/Ocelot.java
@@ -64,11 +_,11 @@
         this.reassessTrustingGoals();
     }
 
-    boolean isTrusting() {
+    public boolean isTrusting() {
         return this.entityData.get(DATA_TRUSTING);
     }
 
-    private void setTrusting(boolean trusting) {
+    public void setTrusting(boolean trusting) {
         this.entityData.set(DATA_TRUSTING, trusting);
         this.reassessTrustingGoals();
     }
@@ -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() {
@@ -136,7 +_,7 @@
 
     @Nullable
     @Override
-    protected SoundEvent getAmbientSound() {
+    public SoundEvent getAmbientSound() {
         return SoundEvents.OCELOT_AMBIENT;
     }
 
@@ -146,12 +_,12 @@
     }
 
     @Override
-    protected SoundEvent getHurtSound(DamageSource damageSource) {
+    public SoundEvent getHurtSound(DamageSource damageSource) {
         return SoundEvents.OCELOT_HURT;
     }
 
     @Override
-    protected SoundEvent getDeathSound() {
+    public SoundEvent getDeathSound() {
         return SoundEvents.OCELOT_DEATH;
     }
 
@@ -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);
